DynamicPPL.jl icon indicating copy to clipboard operation
DynamicPPL.jl copied to clipboard

Move `predict` from Turing, implemented using `fix`

Open sunxd3 opened this issue 1 year ago • 2 comments

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.

sunxd3 avatar Sep 05 '24 06:09 sunxd3

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%
<!-- Total: 0 22
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%
<!-- Total: 31
Totals Coverage Status
Change from base Build 11518673522: -2.2%
Covered Lines: 3053
Relevant Lines: 3944

💛 - Coveralls

coveralls avatar Sep 05 '24 06:09 coveralls

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). Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
ext/DynamicPPLMCMCChainsExt.jl 0.00% 22 Missing :warning:
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     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features:

codecov[bot] avatar Sep 05 '24 06:09 codecov[bot]

This approach currently has issues. See https://github.com/TuringLang/DynamicPPL.jl/issues/702

torfjelde avatar Nov 01 '24 10:11 torfjelde

closing this, will start a similar work after https://github.com/TuringLang/DynamicPPL.jl/pull/716 and https://github.com/TuringLang/DynamicPPL.jl/pull/710

sunxd3 avatar Nov 25 '24 13:11 sunxd3