Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
gdalle authored Sep 25, 2024
1 parent 855a21b commit c57eb48
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
11 changes: 5 additions & 6 deletions src/dense.jl
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,7 @@ end
"""
AutoMooncake
Struct used to select the [Mooncake.jl](https://github.com/compintell/Mooncake.jl) backend
for automatic differentiation.
Struct used to select the [Mooncake.jl](https://github.com/compintell/Mooncake.jl) backend for automatic differentiation.
Defined by [ADTypes.jl](https://github.com/SciML/ADTypes.jl).
Expand All @@ -241,9 +240,7 @@ Defined by [ADTypes.jl](https://github.com/SciML/ADTypes.jl).
# Fields
- `config`: either `nothing` or an instance of `Mooncake.Config` -- see the docstring for
`Mooncake.Config` for more information. `AutoMooncake(; config=nothing)` is equivalent
to `AutoMooncake(; config=Mooncake.Config())`, i.e. the default configuration.
- `config`: either `nothing` or an instance of `Mooncake.Config` -- see the docstring of `Mooncake.Config` for more information. `AutoMooncake(; config=nothing)` is equivalent to `AutoMooncake(; config=Mooncake.Config())`, i.e. the default configuration.
"""
Base.@kwdef struct AutoMooncake{Tconfig} <: AbstractADType
config::Tconfig
Expand Down Expand Up @@ -347,7 +344,9 @@ mode(::AutoSymbolics) = SymbolicMode()
"""
AutoTapir
This ADType is deprecated. `AutoMooncake` should be used instead.
!!! danger
`AutoTapir` is deprecated following a package renaming, please use [`AutoMooncake`](@ref) instead.
"""
struct AutoTapir <: AbstractADType
safe_mode::Bool
Expand Down
2 changes: 1 addition & 1 deletion src/legacy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ end

function AutoTapir(; safe_mode=true)
Base.depwarn(
"AutoTapir is deprecated in favour of AutoMooncake.", :AutoTapir; force=false
"`AutoTapir` is deprecated in favour of `AutoMooncake`.", :AutoTapir; force=false
)
return AutoTapir(safe_mode)
end
1 change: 1 addition & 0 deletions test/legacy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,5 @@ end

@testset "AutoTapir" begin
@test_deprecated AutoTapir()
@test_deprecated AutoTapir(; safe_mode=false)
end

0 comments on commit c57eb48

Please sign in to comment.