Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate setadbackend and update HISTORY file #2144

Merged
merged 6 commits into from
Dec 17, 2023

Conversation

sunxd3
Copy link
Member

@sunxd3 sunxd3 commented Dec 14, 2023

No description provided.

@coveralls
Copy link

coveralls commented Dec 14, 2023

Pull Request Test Coverage Report for Build 7230958361

  • 0 of 12 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 0.0%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/deprecated.jl 0 12 0.0%
Totals Coverage Status
Change from base Build 7208918192: 0.0%
Covered Lines: 0
Relevant Lines: 1396

💛 - Coveralls

Copy link

codecov bot commented Dec 14, 2023

Codecov Report

Attention: 12 lines in your changes are missing coverage. Please review.

Comparison is base (521f791) 0.00% compared to head (1aa5efe) 0.00%.

Files Patch % Lines
src/deprecated.jl 0.00% 12 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##           master   #2144   +/-   ##
======================================
  Coverage    0.00%   0.00%           
======================================
  Files          21      22    +1     
  Lines        1384    1396   +12     
======================================
- Misses       1384    1396   +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yebai
Copy link
Member

yebai commented Dec 14, 2023

Thanks @sunxd3 -- maybe add a depreciation message for Turing.setadbackend to minimise surprises?

HISTORY.md Outdated
# Release 0.30.0

- Replaced global variable-based AD backend mechanism with [`ADTypes.jl`](https://github.com/SciML/ADTypes.jl). Users should now specify the desired `ADType` directly in sampler constructors, e.g., `HMC(0.1, 10; adtype=AutoForwardDiff(; chunksize))`.
- Deprecated and removed interface functions such as `ADBackend`, `setadbackend`, `setsafe`, `setchunksize`, and `setrdcache`.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yebai is there a standard format for deprecation ?

Copy link
Member

@yebai yebai Dec 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can print an informational message when users call Turing.setbackend(). This has to be defined as a function instead of HISTORY.md. See, e.g. https://docs.julialang.org/en/v1/base/base/#Base.@deprecate

Copy link
Member Author

@sunxd3 sunxd3 Dec 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, because we are removing the functions, it doesn't count as deprecation because we skipped the deprecation step.

Currently, it will just error, which is not the worst. Maybe we can have some same-name functions that throw errors and messages with v0.30 and remove these in v0.31. Also depwarn is probably more appropriate here because we are removing insteading of renaming.

Copy link
Member

@yebai yebai Dec 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can have some same-name functions that throw errors and messages with v0.30 and remove these in v0.31.

Sounds good

@sunxd3 sunxd3 changed the title Update HISTORY file Deprecate setadbackend and update HISTORY file Dec 16, 2023
@yebai yebai merged commit d0691e0 into master Dec 17, 2023
9 of 13 checks passed
@yebai yebai deleted the sunxd/update_history_v0.30 branch December 17, 2023 02:57
@devmotion devmotion mentioned this pull request Jan 19, 2024
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.

3 participants