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

Release 0.35: Remove Selectors #779

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

Release 0.35: Remove Selectors #779

wants to merge 6 commits into from

Conversation

mhauru
Copy link
Member

@mhauru mhauru commented Jan 16, 2025

This PR will collect all work related to removing Selectors, Gibbs IDs, and indexing VarInfo with samplers. Since this will involve quite a lot of changes, we'll try a new pattern for code review: Changes will be made incrementally, trying to remove parts of the functionality at a time and getting tests to pass in between. Each such incremental change will be its own PR into this branch, release-0.35. Careful code review will be done at that stage. By the end of it this PR will probably be massive, and heavily breaking, but that can all then go into master with only a light, final review.

Issue(s) closed

Closes #786

Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.17%. Comparing base (29a6c7e) to head (f5c5fda).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #779   +/-   ##
=======================================
  Coverage   86.17%   86.17%           
=======================================
  Files          36       36           
  Lines        4305     4305           
=======================================
  Hits         3710     3710           
  Misses        595      595           

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

@coveralls
Copy link

coveralls commented Jan 23, 2025

Pull Request Test Coverage Report for Build 13052659735

Details

  • 148 of 192 (77.08%) changed or added relevant lines in 6 files are covered.
  • 84 unchanged lines in 13 files lost coverage.
  • Overall coverage decreased (-0.9%) to 85.399%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/contexts.jl 4 6 66.67%
src/abstract_varinfo.jl 20 24 83.33%
src/threadsafe.jl 2 18 11.11%
src/varinfo.jl 105 127 82.68%
Files with Coverage Reduction New Missed Lines %
src/varnamedvector.jl 1 88.25%
src/contexts.jl 3 30.89%
src/values_as_in_model.jl 3 69.23%
src/utils.jl 3 73.93%
src/selector.jl 3 42.86%
src/sampler.jl 3 91.04%
src/distribution_wrappers.jl 4 41.67%
src/abstract_varinfo.jl 4 78.68%
src/model.jl 5 80.0%
src/threadsafe.jl 6 54.24%
Totals Coverage Status
Change from base Build 12993040441: -0.9%
Covered Lines: 3720
Relevant Lines: 4356

💛 - Coveralls

* Reverse order of prefixing

* Simplify generated function (the non-generated path wasn't being used)

* Expand on submodel behaviour in changelog
@TuringLang TuringLang deleted a comment from github-actions bot Jan 30, 2025
@TuringLang TuringLang deleted a comment from github-actions bot Jan 30, 2025
@TuringLang TuringLang deleted a comment from github-actions bot Jan 30, 2025
@TuringLang TuringLang deleted a comment from github-actions bot Jan 30, 2025
@TuringLang TuringLang deleted a comment from github-actions bot Jan 30, 2025
@TuringLang TuringLang deleted a comment from github-actions bot Jan 30, 2025
@TuringLang TuringLang deleted a comment from github-actions bot Jan 30, 2025
* Remove selector stuff from varinfo tests

* Implement link and invlink for varnames rather than samplers

* Replace set_retained_vns_del_by_spl! with set_retained_vns_del!

* Make linking tests more extensive

* Remove sampler indexing from link methods (but not invlink)

* Remove indexing by samplers from invlink

* Work towards removing sampler indexing with StaticTransformation

* Fix invlink/link for TypedVarInfo and StaticTransformation

* Fix a test in models.jl

* Move some functions to utils.jl, add tests and docstrings

* Fix a docstring typo

* Various simplification to link/invlink

* Improve a docstring

* Style improvements

* Fix broken link/invlink dispatch cascade for VectorVarInfo

* Fix some more broken dispatch cascades

* Apply suggestions from code review

Co-authored-by: Xianda Sun <[email protected]>

* Remove comments that messed with docstrings

* Apply suggestions from code review

Co-authored-by: Penelope Yong <[email protected]>

* Fix issues surfaced in code review

* Simplify link/invlink arguments

* Fix a bug in unflatten VarNamedVector

* Rename VarNameCollection -> VarNameTuple

* Remove test of a removed varname_namedtuple method

* Apply suggestions from code review

Co-authored-by: Penelope Yong <[email protected]>

* Respond to review feedback

* Remove _default_sampler and a dead argument of maybe_invlink_before_eval

* Fix a typo in a comment

* Add HISTORY entry, fix one set_retained_vns_del! method

---------

Co-authored-by: Xianda Sun <[email protected]>
Co-authored-by: Penelope Yong <[email protected]>
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.

Nested PrefixContext behaviour is not fully defined
3 participants