def _start_restricted_worker(self, redis_address, redis_password, object_store_memory): num_cores = 0 command = "ray start --redis-address {} " \ "--redis-password {} --num-cpus {} --object-store-memory {}".\ format(redis_address, redis_password, num_cores, object_store_memory) print("Executing command: {}".format(command)) process_info = session_execute(command=command, fail_fast=True) ProcessMonitor.register_shutdown_hook(pgid=process_info.pgid)
def _start_restricted_worker(self, object_store_memory, num_cores=0, labels="", extra_params={}): command = RayServiceFuncGenerator._get_raylet_command( redis_address=self.redis_address, ray_exec="ray ", password=self.redis_password, ray_node_cpu_cores=num_cores, labels=labels, object_store_memory=object_store_memory, extra_params=extra_params) print("Executing command: {}".format(command)) process_info = session_execute(command=command, fail_fast=True) ProcessMonitor.register_shutdown_hook(pgid=process_info.pgid)
def _start_cluster(self): print("Start to launch ray on cluster") ray_rdd = self.sc.range(0, self.num_ray_nodes, numSlices=self.num_ray_nodes) process_infos = ray_rdd.barrier().mapPartitions( self.ray_service.gen_ray_start()).collect() self.ray_processesMonitor = ProcessMonitor(process_infos, self.sc, ray_rdd, verbose=self.verbose) self.redis_address = self.ray_processesMonitor.master.master_addr return self