From 80fdfcd1a5a2dcf6cfb370949eabd0749243e07b Mon Sep 17 00:00:00 2001 From: Richard Shin Date: Sat, 3 Sep 2016 17:37:06 -0700 Subject: [PATCH] Check num_objstores > 0 in start_ray_local (#402) --- lib/python/ray/services.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/python/ray/services.py b/lib/python/ray/services.py index 41f79ea22..95ed7927e 100644 --- a/lib/python/ray/services.py +++ b/lib/python/ray/services.py @@ -172,8 +172,8 @@ def start_ray_local(node_ip_address="127.0.0.1", num_objstores=1, num_workers=0, """ if worker_path is None: worker_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../../scripts/default_worker.py") - if num_workers > 0 and num_objstores < 1: - raise Exception("Attempting to start a cluster with {} workers per object store, but `num_objstores` is {}.".format(num_objstores)) + if num_objstores < 1: + raise Exception("`num_objstores` is {}, but should be at least 1.".format(num_objstores)) scheduler_address = address(node_ip_address, new_scheduler_port()) start_scheduler(scheduler_address, cleanup=True) time.sleep(0.1)