-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Recursion error pickling step functions #4273
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
Comments
I think the reason the error does not show up on Linux is that on Linux multiprocessing is by default done by forking (requiring no pickling), whereas on Windows and MacOS the default is spawn. (On MacOS this didn't use to be the case, but has been since Python 3.8. Although your stack trace shows Python 3.6. In any case I'm pretty sure the multiprocessing context is the deciding factor here.) |
Yep, can confirm, adding |
Great investigative work! 🧐 |
I checked whether this also arises on 3.9.3:
made the same change ( |
Ran a
So #4053 introduces this. |
Ping @aseyboldt. |
I'm wondering what the best route here is. To me, #4053 looks like it should be unproblematic. In the now-failing test script, the
so with a bound method The annoying thing is that apparently |
Description of your problem
First reported on #3811
When testing on Mac (#3811) or Windows (#4269),
RecursionError: maximum recursion depth exceeded in comparison
errors inTestDensityDist
inparallel_sampling.py
when picklingstep_method
:Checking with pdb, we try to save the
logp
of aDensityDist
. This leads to needing to pickleNormal.logp
which leads to needing to picklepymc3.distributions.continuous.Normal
and I fear to trying to pickle all of pymc3.It is odd that this shows up on Mac and Windows, but not on our Linux tests.
Please provide the full traceback.
From @MarcoGorelli :
Versions and main components
/cc @michaelosthege @MarcoGorelli
The text was updated successfully, but these errors were encountered: