From c943ecaa42d5d1fd5ec1de91147c8c1ad0eb906e Mon Sep 17 00:00:00 2001 From: Eric Liang Date: Wed, 23 Aug 2017 06:20:15 +0200 Subject: [PATCH] Better error message when actor creation is attempted before ray.init() (#858) --- python/ray/actor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/ray/actor.py b/python/ray/actor.py index 168a82488..e5848d330 100644 --- a/python/ray/actor.py +++ b/python/ray/actor.py @@ -137,7 +137,8 @@ def fetch_and_register_actor(actor_class_key, worker): def export_actor_class(class_id, Class, actor_method_names, checkpoint_interval, worker): if worker.mode is None: - raise NotImplemented("TODO(pcm): Cache actors") + raise Exception("Actors cannot be created before Ray has been " + "started. You can start Ray with 'ray.init()'.") key = b"ActorClass:" + class_id d = {"driver_id": worker.task_driver_id.id(), "class_name": Class.__name__,