mirror of
https://github.com/wassname/ray.git
synced 2026-07-29 11:26:04 +08:00
Fix the incorrect serialization behavior with pickle (#5960)
This commit is contained in:
committed by
Philipp Moritz
parent
b6e7ed20ce
commit
95241f6686
@@ -2090,6 +2090,10 @@ def _register_custom_serializer(cls,
|
||||
"Exactly one of use_pickle, use_dict, or serializer/deserializer must "
|
||||
"be specified.")
|
||||
|
||||
if worker.use_pickle and serializer is None:
|
||||
# In this case it should do nothing.
|
||||
return
|
||||
|
||||
if use_dict:
|
||||
# Raise an exception if cls cannot be serialized efficiently by Ray.
|
||||
serialization.check_serializable(cls)
|
||||
|
||||
Reference in New Issue
Block a user