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

Do not use initval in test model #7529

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

ricardoV94
Copy link
Member

@ricardoV94 ricardoV94 commented Oct 8, 2024

PRs #7508 and #7492 introduced incompatible changes but were not tested simultaneously.

Deepcopying the steps in the tests leads to deepcopying the model which uses clone_model, which in turn does not support initvals.

See #7528 why this is currently not implemented.

@lucianopaz irregardless of the issues with copying models with initvals, is there any concern for the step functionality that model.copy uses clone_model these days? AFAICT this was only used in the tests so a first pass I would guess no?


📚 Documentation preview 📚: https://pymc--7529.org.readthedocs.build/en/7529/

@ricardoV94 ricardoV94 added tests no releasenotes Skipped in automatic release notes generation labels Oct 8, 2024
@ricardoV94 ricardoV94 mentioned this pull request Oct 8, 2024
11 tasks
@lucianopaz
Copy link
Contributor

@lucianopaz irregardless of the issues with copying models with initvals, is there any concern for the step functionality that model.copy, uses clone_model these days? AFAICT this was only used in the tests so a first pass I would guess no?

No, there should be no issue with that. The step methods sampling_state is independent from the model instance and its variables, so as long as copying the model doesn't break the relationship with the step method's var, then nothing should break.

PRs pymc-devs#7508 and pymc-devs#7492 introduced incompatible changes but were not tested simultaneously.

Deepcopying the steps in the tests leads to deepcopying the model which uses `clone_model`, which in turn does not support initvals.
Copy link

codecov bot commented Oct 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.68%. Comparing base (465d8ac) to head (79200d2).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #7529      +/-   ##
==========================================
+ Coverage   90.55%   92.68%   +2.13%     
==========================================
  Files         104      104              
  Lines       17412    17412              
==========================================
+ Hits        15767    16139     +372     
+ Misses       1645     1273     -372     

see 16 files with indirect coverage changes

@ricardoV94 ricardoV94 merged commit 4f06ab7 into pymc-devs:main Oct 8, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no releasenotes Skipped in automatic release notes generation tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants