-
-
Notifications
You must be signed in to change notification settings - Fork 181
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
Dill breaks cloudpickle > 1.3.0 on inner functions with closure #383
Comments
The issue is that However, rather than only giving one option, If you want a serialization that is similar to the choices that Then, for case you want cloudpickle and dill working together, you can use |
Please close if this resolves the issue for you. |
I've changed the code to import dill
dill.extend(False)
import cloudpickle
dill.extend(True) which seems to fix it in this case. And using |
tt.TensorVariable was probably the wrong way to begin with. PyGMO uses cloudpickle, PyMC3 uses dill - they currently break each other. See uqfoundation/dill#383
…ng in case of pickling problems The pickling fails if dill and cloudpickle are installed at the same time (see uqfoundation/dill#383). This is, for example, the case when PyMC3 is installed.
Cloudpickle 1.5.0, dill 0.3.2 or 0.3.1.1:
This fails with
ValueError: Cell is empty
.Without the
dill
import, or with the dill import after the cloudpickle import, and it's all fine.If the inner function is just
then it's also fine.
The problem seems to be if the inner function captures anything in its closure.
According to the cloudpickle dev cloudpipe/cloudpickle#393
is there a way to get around this, and have both dill and cloudpickle work?
The text was updated successfully, but these errors were encountered: