Skip to content

Only add total_size mapping to observed RVs #6331

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

Closed

Conversation

ricardoV94
Copy link
Member

This fixes inconsistent use of the rvs_to_total_sizes mapping. It only assigns observed_RVs to it, including the observed component of an imputed variable (even though that is not allowed at the moment).

It also raises if passed to free_RVs

Docs / Maintenance

  • Cleanup total_size interface

* Add direct test
* Add checks for when it's not applicable
* Rename mapping to `observed_rvs_to_total_sizes`
@ricardoV94 ricardoV94 requested a review from ferrine November 22, 2022 16:07
@ricardoV94 ricardoV94 changed the title Only add total_size mapping to observed RVs Only add total_size mapping to observed RVs Nov 22, 2022
@codecov
Copy link

codecov bot commented Nov 22, 2022

Codecov Report

Merging #6331 (5468499) into main (cb37afa) will decrease coverage by 27.16%.
The diff coverage is 94.69%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #6331       +/-   ##
===========================================
- Coverage   90.39%   63.23%   -27.17%     
===========================================
  Files         111      110        -1     
  Lines       23869    23966       +97     
===========================================
- Hits        21577    15154     -6423     
- Misses       2292     8812     +6520     
Impacted Files Coverage Δ
pymc/variational/opvi.py 75.27% <ø> (-11.81%) ⬇️
pymc/model.py 67.64% <45.45%> (-22.12%) ⬇️
pymc/distributions/continuous.py 97.84% <100.00%> (+0.33%) ⬆️
pymc/distributions/discrete.py 99.22% <100.00%> (ø)
pymc/distributions/multivariate.py 92.17% <100.00%> (-0.12%) ⬇️
pymc/tests/distributions/test_continuous.py 99.76% <100.00%> (+<0.01%) ⬆️
pymc/tests/backends/test_base.py 0.00% <0.00%> (-100.00%) ⬇️
pymc/tests/tuning/test_scaling.py 0.00% <0.00%> (-100.00%) ⬇️
pymc/tests/tuning/test_starting.py 0.00% <0.00%> (-100.00%) ⬇️
pymc/tests/backends/test_ndarray.py 0.00% <0.00%> (-100.00%) ⬇️
... and 66 more

@ricardoV94 ricardoV94 marked this pull request as draft November 29, 2022 14:21
@ricardoV94
Copy link
Member Author

Superseded by #6523

@ricardoV94 ricardoV94 closed this Feb 28, 2023
@ricardoV94 ricardoV94 deleted the model_api_cleanup_contd branch June 6, 2023 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant