You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What behavior of the library made you think about the improvement?
Currently @cache relies on __getstate__, however it's not obvious when implementing this method that it should result in a regularized object which has a hash which is consistent with equivalent objects. Serialization doesn't necessitate an equivalent representation for equivalent objects as @brandonwillard pointed out in #929 (comment)
What behavior of the library made you think about the improvement?
Currently
@cache
relies on__getstate__
, however it's not obvious when implementing this method that it should result in a regularized object which has a hash which is consistent with equivalent objects. Serialization doesn't necessitate an equivalent representation for equivalent objects as @brandonwillard pointed out in #929 (comment)Further,
cloudpickle
doesn't guarantee determinism cloudpipe/cloudpickle#453How would you like it to behave?
To ensure we avoid cache misses, we should first call
cache_key._stablehash()
, with__getstate__()
as a fallback.The text was updated successfully, but these errors were encountered: