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 predict from Turing, implemented using fix #651

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sunxd3
Copy link
Member

@sunxd3 sunxd3 commented Sep 5, 2024

fix #647

Turing's implementation relies on setval_and_resample! to generate the predictions, and use bundle_samples function implemented in Turing.Inference.

This PR provides a draft implementing predict using the new fix interface: given a sample from the posterior, we can fix the values of model parameters with the posterior sample, then just generate one sample from prior.

This doesn't work yet.

@coveralls
Copy link

coveralls commented Sep 5, 2024

Pull Request Test Coverage Report for Build 11609937314

Details

  • 0 of 22 (0.0%) changed or added relevant lines in 1 file are covered.
  • 31 unchanged lines in 5 files lost coverage.
  • Overall coverage decreased (-2.2%) to 77.409%

Changes Missing Coverage Covered Lines Changed/Added Lines %
ext/DynamicPPLMCMCChainsExt.jl 0 22 0.0%
Files with Coverage Reduction New Missed Lines %
src/contexts.jl 1 74.44%
src/model.jl 2 92.47%
src/abstract_varinfo.jl 3 74.63%
src/context_implementations.jl 9 57.79%
src/threadsafe.jl 16 48.6%
Totals Coverage Status
Change from base Build 11518673522: -2.2%
Covered Lines: 3053
Relevant Lines: 3944

💛 - Coveralls

Copy link

codecov bot commented Sep 5, 2024

Codecov Report

Attention: Patch coverage is 0% with 22 lines in your changes missing coverage. Please review.

Project coverage is 77.34%. Comparing base (18af48a) to head (f56a41f).

Files with missing lines Patch % Lines
ext/DynamicPPLMCMCChainsExt.jl 0.00% 22 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #651      +/-   ##
==========================================
- Coverage   79.23%   77.34%   -1.89%     
==========================================
  Files          30       30              
  Lines        4214     3947     -267     
==========================================
- Hits         3339     3053     -286     
- Misses        875      894      +19     

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

@torfjelde
Copy link
Member

torfjelde commented Nov 1, 2024

This approach currently has issues. See #702

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.

Transfer Turing.Inference.predict to DynamicPPL.
3 participants