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

Support for PyMC >= 5 #38

Merged
merged 5 commits into from
Nov 1, 2023
Merged

Support for PyMC >= 5 #38

merged 5 commits into from
Nov 1, 2023

Conversation

vandalt
Copy link
Contributor

@vandalt vandalt commented Nov 1, 2023

Hi!

After playing with PyMC >= 5 for exoplanet-core (exoplanet-dev/exoplanet-core#89), I thought I'd give this one a try.

Most changes boil down to replacing aesara with pytensor. I also updated some testval arguments to initval.

One somewhat important change is that pm.pytensorf.rvs_to_value_vars() was deprecated with a warning, so I replaced it with pymc.Model().replace_rvs_by_values(), which is equivalent but requires the model context. The pm.pytensorf.replace_rvs_by_values() requires extra keyword arguments which are passed automatically by the model method.

Also, the isort pre-commit hook failed so I updated the version (ref: PyCQA/isort#2108)

… for utils.eval_in_model()

Bounded variables are transformed by PyMC, which has implications for rvs_to_values I think
Lists of variables are handled differently than single variables by utils.Evaluator
…_rvs_by_values()`

These should be equivalent. `pymc.pytensorf.rvs_to_value_vars()` requires extra argument, but the model method fills them automatically.
@dfm dfm merged commit 6ea4f8e into exoplanet-dev:main Nov 1, 2023
5 checks passed
@dfm
Copy link
Member

dfm commented Nov 1, 2023

LGTM - thank you!

@vandalt vandalt deleted the pymc-v5 branch November 2, 2023 00:34
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.

2 participants