Skip to content

Commit

Permalink
force depwarns
Browse files Browse the repository at this point in the history
  • Loading branch information
mcabbott committed Nov 8, 2024
1 parent 1cf7c87 commit 5281209
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/deprecations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,14 @@ const FluxAMDGPUAdaptor = AMDGPUDevice
const FluxMetalAdaptor = MetalDevice

function gradient(f, p::Zygote.Params)
Base.depwarn("""Implicit gradients such as `gradient(f, ::Params)` are deprecated!
Please see the docs for new explicit form.""", :gradient)
Base.depwarn("""Implicit gradients such as `gradient(f, ::Params)` are deprecated in Flux!
Please see the docs for new explicit form.""", :gradient; force=true)
Zygote.gradient(f, p)
end

function withgradient(f, p::Zygote.Params)
Base.depwarn("""Implicit gradients such as `withgradient(f, ::Params)` are deprecated!
Please see the docs for new explicit form.""", :withgradient)
Base.depwarn("""Implicit gradients such as `withgradient(f, ::Params)` are deprecated in Flux!
Please see the docs for new explicit form.""", :withgradient; force=true)
Zygote.withgradient(f, p)
end

Expand Down

0 comments on commit 5281209

Please sign in to comment.