-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fix pymc3 to work with latest theano-pymc master #4382
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
Conversation
There is a Theano-PyMC 1.0.13 which you can try to pin. |
Several of the remaining test failures seem like a possible regression in theano or pymc3 somewhere. The following one pops up in several locations, and there are a few other pickle-related failures as well:
|
@kyleabeauchamp Were you able to test with aesara-devs/aesara#242 ? |
I haven't tested, sorry. I tried to edit requirements.txt and trigger CI/CD but I don't think that works because we're using an environment install path that doesn't support direct git access. |
@kyleabeauchamp Maybe you can just run the failing test locally? |
I can confirm that |
Looking at local tests, there are some other tests failing as well. You can see them in the CI/CD logs too if you look.
|
/pre-commit-run |
I'm looking into aesara-devs/aesara#243 It would be great if either of you can already deal with the |
Looks like the switch from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some—if not all—of the current errors are due to pymc3.variational.opvi
's use of Theano's old broken RNG interface.
Specifically, lines like this wrongly assume that the first argument to an RNG sampler is always the output size/shape. This is—and was—incorrect according to the NumPy interface Theano's RNGs were supposed to emulate, and the new interface fixed that, so it absolutely won't work from here on.
After changing those lines to specify size=shape
, pymc3.tests.test_sampling.TestSample.test_sample_init
passes.
Also, these commits need to be squashed (e.g. all the RNG changes in one commit and the JAX ones in another).
It seems like there are still pickle failures in the CI/CD logs, even after we bumped to theano 1.0.14. E.g.,
|
I wonder if the problem is now in the VI module? Is there a way to see which "module"? |
Multiple errors are due to the variational tests not having consistent The former can likely be fixed by correctly setting the test input types, and the latter may be due to a new RNG seeding caused by the change to |
5f3c137
to
9b58bd3
Compare
I've reorganized the commits and made some minor updates to the variational tests, so you'll need to rebase locally. Once aesara-devs/aesara#252 goes through we can cut a release for it and pin that version in this PR. Otherwise, most of the test failures should be fixed after that, but I think there's still one remaining. |
9b58bd3
to
a3cb024
Compare
It looks like there are some unexpected The reason |
Codecov Report
@@ Coverage Diff @@
## master #4382 +/- ##
=======================================
Coverage 88.07% 88.08%
=======================================
Files 88 88
Lines 14476 14475 -1
=======================================
Hits 12750 12750
+ Misses 1726 1725 -1
|
Thanks @kyleabeauchamp and @brandonwillard, really glad to have PyMC3 work again with recent Theano. |
The current pymc master branch is pinned to the latest theano release, but there have been some breaking changes since that release (e.g., Random and jax_dispatch changes). This PR fixes these compatibility issues. Note this is not expected to pass initially until we sort out the version bump for theano.