diff --git a/python/ray/worker.py b/python/ray/worker.py index d28fb7f94..273db9be7 100644 --- a/python/ray/worker.py +++ b/python/ray/worker.py @@ -1391,6 +1391,9 @@ def register_custom_serializer(cls, use_dict: Deprecated. class_id (str): Unique ID of the class. Autogenerated if None. """ + worker = global_worker + worker.check_connected() + if use_pickle: raise DeprecationWarning( "`use_pickle` is no longer a valid parameter and will be removed "