-
-
Notifications
You must be signed in to change notification settings - Fork 574
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
[Bug]: Error when pickling simulation #2982
Comments
Pickling simulations is a pain and simulations are super cheap to set up. Do we want to continue allowing this, or suggest that people set up configuration files instead? |
This also kind of relates to #2787 |
I think that some optimisers pickle (or do something similar to pickling) when running in parallel. It was not where this issues came up, but had similar issues in the past with pybamm-param. I think for that it would be enough to be able to access an unsolved version. |
Ok, I found the issue. It is with Lines 1090 to 1094 in a1e64c7
Note that this issue appears only after merging #2960. I labelled it as high priority as ideally it would be good to fix that jointly with #2960. |
PyBaMM Version
23.4.1
Python Version
3.9.16
Describe the bug
When trying to pickle a simulation with experiment I get an error related to a
SwigPy
object that can't be pickled. I suspect it is a problem with Casadi, but haven't been able to trace the origin of such object.Steps to Reproduce
Run
If instead you replace the last few lines by
it works fine.
Relevant log output
The text was updated successfully, but these errors were encountered: