-
Notifications
You must be signed in to change notification settings - Fork 19.5k
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
TypeError: can't pickle _thread.RLock objects #10528
Comments
I tried putting this in there, to force the whole thing onto a single thread, but it doesn't care, and I still get the error.
|
I've just devised the following hacky non-thread-safe workaround that allows me to pickle keras stuff. I would still very much appreciate a more robust solution however. Note the
|
As of right now Keras models are not picklable. Check in when this PR is merged: |
I experienced this error when passing a |
I am using |
Are they still not picklable? |
Perhaps related to tensorflow/tensorflow#34697 ? |
Is there any progress on this? |
Getting same error |
Getting the error when trying to joblib.dump() a tf.keras model. |
Check that you are up-to-date with the master branch of Keras. You can update with:
pip install git+git://github.com/keras-team/keras.git --upgrade --no-deps
If running on TensorFlow, check that you are up-to-date with the latest version. The installation instructions can be found here.
[NA] If running on Theano, check that you are up-to-date with the master branch of Theano. You can update with:
pip install git+git://github.com/Theano/Theano.git --upgrade --no-deps
(or just copy the script here if it is short).
NOTE: I am not using
Lambda
functions, as per some other pickling thread object problems. Also, I do not see anLambda
calls inkeras.wrappers.scikit_learn
.I would like to pickle a simple extension of a
KerasClassifier
as part of my sklearn pipeline, but it's throwing a tantrum about threading stuff. I'm happy to simply single thread the thing for the time being, so a solution involving that would be appreciated if nothing else.Result:
TypeError: can't pickle _thread.RLock objects
The text was updated successfully, but these errors were encountered: