Skip to content

Conversation

@penelopeysm
Copy link
Member

@penelopeysm penelopeysm commented Dec 21, 2025

Because the model is contextualised with InitContext, the call to check_model doesn't actually need anything more than an OnlyAccsVarInfo. This allows models that don't work well with Metadata* to still be checked for validity (note that the check, as defined in DynamicPPL, only uses DebugAccumulator, it does not actually use metadata in any form -- unless the model has DefaultContext as its leaf context -- which is not the case here).

(cc @PTWaade I think this is the reason why check_model failed)

* one might ask what models don't work well with metadata, but still otherwise work. There are a couple of things that come to mind: 1) parallel assume statements; and 2) special distribution types for which the from_[linked_]_vec_transform functions are not defined. These models should in principle work with Prior() sampling, which only ever uses OnlyAccsVarInfo. However, currently, they don't unless you disable check_model; this is the behaviour that this PR fixes.

@github-actions
Copy link
Contributor

Turing.jl documentation for PR #2742 is available at:
https://TuringLang.github.io/Turing.jl/previews/PR2742/

@PTWaade
Copy link

PTWaade commented Dec 21, 2025

This makes sense ! Lightning fast work Penelope - and I who thought you weren't working currently !

@penelopeysm
Copy link
Member Author

ahhhh, it's only 3 lines so I made an exception 😄

@codecov
Copy link

codecov bot commented Dec 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.51%. Comparing base (4dc7ad0) to head (f343bbb).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2742   +/-   ##
=======================================
  Coverage   86.51%   86.51%           
=======================================
  Files          20       20           
  Lines        1261     1261           
=======================================
  Hits         1091     1091           
  Misses        170      170           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@penelopeysm penelopeysm merged commit f3bd120 into main Dec 21, 2025
28 of 29 checks passed
@penelopeysm penelopeysm deleted the py/onlyaccs-debug branch December 21, 2025 15:43
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