From c1b05b720ded1338d82f50f5c2df050930ccd350 Mon Sep 17 00:00:00 2001 From: Cloud Han Date: Fri, 27 Mar 2020 01:24:06 +0800 Subject: [PATCH] calling register_custom_serializer require ray to be initialized (#7752) --- python/ray/worker.py | 3 +++ 1 file changed, 3 insertions(+) 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 "