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

Move ad.jl to DynamicPPL #2158

Merged
merged 10 commits into from
Feb 19, 2024
Merged

Move ad.jl to DynamicPPL #2158

merged 10 commits into from
Feb 19, 2024

Conversation

sunxd3
Copy link
Collaborator

@sunxd3 sunxd3 commented Jan 23, 2024

Twin PR from DynamicPPL.jl
Address: #2141

Description:

  • getADBackends are renamed to getADType and moved to Inference module as well as LogDensityProblemsAD.ADgradient(ℓ::LogDensityFunction)
  • The LogDensityProblemsAD.ADgradient(adtype, ℓ) specific to RD and FD are moved to DynamicPPL
  • The idea is that with DynamicPPL, call to ADgradient must also gives the adtype, in Turing, we just use the adtype from the algorithm

Will finish up with the test, once DynamicPPL PR is merged

test/essential/ad.jl Outdated Show resolved Hide resolved
@sunxd3
Copy link
Collaborator Author

sunxd3 commented Feb 16, 2024

looks like TuringLang/AdvancedMH.jl#88 is breaking things

@coveralls
Copy link

Pull Request Test Coverage Report for Build 7935140085

Details

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

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/mcmc/Inference.jl 0 9 0.0%
Files with Coverage Reduction New Missed Lines %
src/mcmc/Inference.jl 1 0.0%
Totals Coverage Status
Change from base Build 7935132657: 0.0%
Covered Lines: 0
Relevant Lines: 1367

💛 - Coveralls

Copy link

codecov bot commented Feb 17, 2024

Codecov Report

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

Comparison is base (cf647b1) 0.00% compared to head (a303b9b) 0.00%.

❗ Current head a303b9b differs from pull request most recent head 7ee7314. Consider uploading reports for the commit 7ee7314 to get more accurate results

Files Patch % Lines
src/mcmc/Inference.jl 0.00% 9 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##           master   #2158   +/-   ##
======================================
  Coverage    0.00%   0.00%           
======================================
  Files          22      21    -1     
  Lines        1385    1367   -18     
======================================
+ Misses       1385    1367   -18     

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

@sunxd3 sunxd3 marked this pull request as ready for review February 18, 2024 07:31
@sunxd3
Copy link
Collaborator Author

sunxd3 commented Feb 19, 2024

This seems to causing method redefine errors, ref #2173

@yebai yebai changed the title [WIP] Move ad.jl to DynamicPPL Move ad.jl to DynamicPPL Feb 19, 2024
Copy link
Member

@yebai yebai left a comment

Choose a reason for hiding this comment

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

Looks good to me, @sunxd3! Can you add a note about this change to History.md and release info, so some users depending on Turing internals do not get surprised.

@sunxd3 sunxd3 merged commit 616a07f into master Feb 19, 2024
4 of 11 checks passed
@sunxd3 sunxd3 deleted the sunxd/move_ad branch February 19, 2024 17:32
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