-
Notifications
You must be signed in to change notification settings - Fork 167
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
1.3.0 cloudpickle.load hits AttributeError: module 'types' has no attribute 'ClassType' #349
Comments
Coming back to this issue. As per cloudpickle's README and and as I replied in mlflow/mlflow#2429 (comment) , cloudpickle does not support loading objects from prior versions as it's only meant to transient object flowing between the nodes of a cluster. That being said we could temporarily do an effort for backward compat this time with something like: if not hasattr(types, "ClassType"):
types.ClassType = type but this is weird and I would rather not have this on the long term. |
I'm afraid the proposed workaround will end up recreating the problem reported in #337. |
What might work though is special-casing cloudpickle/cloudpickle/cloudpickle.py Lines 390 to 391 in a69b92d
|
Yes, this is what I was coming to by reading the reports. Let's add a small compat fix there. |
Compat fix implemented in #359. |
After upgrading to 1.3.0 from 1.2.2, our load() code starts having this issue.
Also found this post described the same issue we got. mlflow/mlflow#2429
I suspect it is caused by #337 "Fix a side effect that would redefine types.ClassTypes as type when importing cloudpickle", which removed
types.ClassType = type
The text was updated successfully, but these errors were encountered: