-
Notifications
You must be signed in to change notification settings - Fork 176
TypeError: an integer is required (got type bytes) #404
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
Can you reproduce this with standard Also could you print |
If I move In python 3.7:
In python 3.8:
The same error happens when using |
I have encountered the same issue. |
I replicated this with a clean virtual env install with python 3.8. Downgrading to 3.7 fixes the bug. |
I have debugged why this happens: When reducing a code object for pickling, cloudpickle stores it as a list of arguments to CodeType constructor: code. As you can see in the linked code, the list of those arguments changes between Python versions. Therefore pickling using one version of Python and unpickling using a different version does not work. It could be resolved by creating a custom function to be used in reconstructing code objects, and having it deal with different Python source versions. However, I'm not sure if this would be a helpful improvement, or a false promise if passing pickled objects between different Python versions (or different cloudpickle versions, for that matter) is not expected to work anyway. Looking forward for the thoughts of cloudpickle maintainers on this issue. |
I am facing the same issue. I have used mlflow to log my pytorch model (a few months back). I am not able to load the model back after updating to python 3.8 (from 3.7). This is very restrictive. Just changing the python version or cloudpickle version will break all the code. I would really appreciate any help. |
Same issue here (cloudpickling objects from 3.7 and unpickle it from 3.8). Feel it's probably an intrinsic issue for cloudpickle. |
Since upgrading to python 3.8 I can't access pickle files created with python 3.7.
This originated from this issue and might be related to this one.
Repro
In python 3.7 (cloudpickle==1.6.0):
In python 3.8 (cloudpickle==1.6.0):
Throws
Is there any way to migrate those pickle files to use them with python 3.8?
The text was updated successfully, but these errors were encountered: