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

Replace instances of @submodel with to_submodel() #751

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

penelopeysm
Copy link
Member

@penelopeysm penelopeysm commented Dec 13, 2024

This PR replaces remaining instances of @submodel with to_submodel in DynamicPPL, including in the demo models.

To get tests to pass, it also implements the functionality needed for the pointwise_logp family of functions to work on submodels.

To prevent @submodel from being completely untested, It also adds some very basic tests for @submodel inside test/deprecated.jl, just to make sure that it's still behaving correctly.

Closes #750

Closes #752

@penelopeysm penelopeysm changed the base branch from master to py/separate-doctests December 13, 2024 17:04
Base automatically changed from py/separate-doctests to master December 13, 2024 17:31
Copy link

codecov bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.93%. Comparing base (62a0f19) to head (5fa5410).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #751      +/-   ##
==========================================
- Coverage   85.94%   85.93%   -0.02%     
==========================================
  Files          36       36              
  Lines        4276     4280       +4     
==========================================
+ Hits         3675     3678       +3     
- Misses        601      602       +1     

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

@coveralls
Copy link

coveralls commented Dec 13, 2024

Pull Request Test Coverage Report for Build 12323480116

Details

  • 7 of 7 (100.0%) changed or added relevant lines in 2 files are covered.
  • 31 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-0.03%) to 86.015%

Files with Coverage Reduction New Missed Lines %
src/submodel_macro.jl 2 81.08%
src/varinfo.jl 3 84.92%
src/model.jl 5 75.93%
src/threadsafe.jl 21 46.61%
Totals Coverage Status
Change from base Build 12323466233: -0.03%
Covered Lines: 3678
Relevant Lines: 4276

💛 - Coveralls

@penelopeysm penelopeysm self-assigned this Dec 13, 2024
@penelopeysm penelopeysm marked this pull request as ready for review December 13, 2024 19:55
@penelopeysm penelopeysm removed their assignment Dec 13, 2024
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

Submodel regression with pointwise_logdensities Old @submodel syntax is very slow within testsets
2 participants