Skip to content

Fix deprecation warning for autodiff parameter in tests#356

Merged
ChrisRackauckas merged 1 commit intomasterfrom
fix-autodiff-deprecation-warnings
Jul 31, 2025
Merged

Fix deprecation warning for autodiff parameter in tests#356
ChrisRackauckas merged 1 commit intomasterfrom
fix-autodiff-deprecation-warnings

Conversation

@ChrisRackauckas
Copy link
Member

Summary

  • Fix deprecation warning for using Bool with autodiff parameter in Turing tests
  • Replace autodiff = false with AutoFiniteDiff() as the new recommended approach
  • Add ADTypes as a test dependency

Test plan

  • Verify deprecation warnings are eliminated when running tests with --depwarn=error
  • Confirm Turing tests pass with the new autodiff specification
  • Apply JuliaFormatter to maintain code consistency

Addresses the deprecation warning:

Using a `Bool` for keyword argument `autodiff` is deprecated. Please use an `ADType` specifier.

🤖 Generated with Claude Code

Replace deprecated `autodiff = false` with `AutoFiniteDiff()` in Turing tests.
This change addresses the deprecation warning:
"Using a `Bool` for keyword argument `autodiff` is deprecated. Please use an `ADType` specifier."

Changes:
- Add ADTypes to test dependencies in Project.toml
- Update test/turing.jl to use AutoFiniteDiff() instead of autodiff = false
- Import ADTypes in test/turing.jl

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ChrisRackauckas ChrisRackauckas force-pushed the fix-autodiff-deprecation-warnings branch from c1e133d to faaf228 Compare July 31, 2025 08:11
@ChrisRackauckas ChrisRackauckas merged commit bfbf074 into master Jul 31, 2025
3 of 10 checks passed
@ChrisRackauckas ChrisRackauckas deleted the fix-autodiff-deprecation-warnings branch July 31, 2025 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant