pymc-devs / pymc

Bayesian Modeling and Probabilistic Programming in Python
https://docs.pymc.io/
Other
8.48k stars 1.97k forks source link

Allow freezing only subset of data and dims #7248

Closed ricardoV94 closed 2 months ago

ricardoV94 commented 2 months ago

Description

This improves the optimization introduced on #7047, to allow freezing a subset of dims and data It also fixes a bug where the dim_lengths were not returned

Checklist

Type of change


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

ricardoV94 commented 2 months ago

One day mypy will be useful, today is not that day

ricardoV94 commented 2 months ago

We should have a test that the original model can still be changed. Otherwise looks fine to me!

Added that check to the first test