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

Add DynamicPPL integration tests #2393

Closed
wants to merge 1 commit into from
Closed

Conversation

penelopeysm
Copy link
Member

@penelopeysm penelopeysm commented Nov 15, 2024

This PR adds the Turing/DynamicPPL integration tests (from the test/turing folder in DynamicPPL) to this repository instead.

The main motivation behind this PR is to ensure that the tests added here are always run whenever a new version of Turing is released, thus making it impossible to release a version of Turing that contains a buggy version of DynamicPPL. See TuringLang/DynamicPPL.jl#703 for more thorough explanation.

Some implementation details:

  • I made each test file its own module. This mimics the structure of the other tests in Turing.jl.
  • I had to add AbstractPPL and BangBang as explicit test depedencies (previously they were transitive deps).
  • Because the DynamicPPL integration tests run very quickly, it's probably OK for to run them under the 'everything else' bucket in the CI setup. Hence this PR makes no change to the CI.
  • I fixed a couple of deprecation warnings (specifically link!(vi, sampler) -> link!!(vi, sampler, model); the same with invlink!; and AutoReverseDiff(false) -> AutoReverseDiff(; compile=false)).

Otherwise, this is a straight copy paste.

Copy link

codecov bot commented Nov 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.28%. Comparing base (c0a4ee9) to head (de0c54c).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2393      +/-   ##
==========================================
- Coverage   86.41%   86.28%   -0.13%     
==========================================
  Files          22       22              
  Lines        1575     1575              
==========================================
- Hits         1361     1359       -2     
- Misses        214      216       +2     

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

@coveralls
Copy link

coveralls commented Nov 15, 2024

Pull Request Test Coverage Report for Build 12171154106

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 4 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.3%) to 37.831%

Files with Coverage Reduction New Missed Lines %
src/mcmc/Inference.jl 2 52.44%
src/mcmc/abstractmcmc.jl 2 92.86%
Totals Coverage Status
Change from base Build 12110228665: -0.3%
Covered Lines: 586
Relevant Lines: 1549

💛 - Coveralls

@penelopeysm
Copy link
Member Author

Should be mergeable, I think, then I'll get rid of them from DynamicPPL.

Copy link
Member

@torfjelde torfjelde left a comment

Choose a reason for hiding this comment

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

Some of these tests could deffo be moved to DynamicPPL.jl proper, but happy to merge them now if accompanied with an issue over at DPPL to ensure we don't loose track of the TODOs:)

test/dynamicppl/compiler.jl Show resolved Hide resolved
test/dynamicppl/loglikelihoods.jl Outdated Show resolved Hide resolved
test/dynamicppl/model.jl Outdated Show resolved Hide resolved
@penelopeysm
Copy link
Member Author

Currently thinking it's more prudent to figure out how to move those tests into the DPPL test suite proper 😅

@penelopeysm penelopeysm marked this pull request as draft November 29, 2024 14:34
@penelopeysm
Copy link
Member Author

In line with the above, I'm going to close this PR and open a new one

@penelopeysm penelopeysm closed this Dec 5, 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.

4 participants