update api for start_ray_local (#174)

This commit is contained in:
Robert Nishihara
2016-06-27 11:57:22 -07:00
committed by Philipp Moritz
parent 902cac3089
commit fb6c74ecab
10 changed files with 76 additions and 71 deletions
+6 -1
View File
@@ -107,7 +107,12 @@ def start_node(scheduler_address, node_ip_address, num_workers, worker_path=None
# driver_mode should equal ray.SCRIPT_MODE if this is being run in a script and
# ray.SHELL_MODE if it is being used interactively in a shell. It can also equal
# ray.PYTHON_MODE to run things in a manner equivalent to serial Python code.
def start_singlenode_cluster(return_drivers=False, num_objstores=1, num_workers_per_objstore=0, worker_path=None, driver_mode=ray.SCRIPT_MODE):
def start_ray_local(num_workers=0, worker_path=None, driver_mode=ray.SCRIPT_MODE):
start_services_local(num_objstores=1, num_workers_per_objstore=num_workers, worker_path=worker_path, driver_mode=driver_mode)
# This is a helper method which is only used in the tests and should not be
# called by users
def start_services_local(num_objstores=1, num_workers_per_objstore=0, worker_path=None, driver_mode=ray.SCRIPT_MODE, return_drivers=False):
global drivers
if num_workers_per_objstore > 0 and worker_path is None:
raise Exception("Attempting to start a cluster with {} workers per object store, but `worker_path` is None.".format(num_workers_per_objstore))