From afa7b653766bf1f30721af9a35caddc55cc8a98a Mon Sep 17 00:00:00 2001 From: Yang Wang Date: Wed, 28 Oct 2020 15:43:01 +0800 Subject: [PATCH] Add ray rdd (#2996) * add ray rdd * fix style * add more tests --- python/orca/src/bigdl/orca/ray/raycontext.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/orca/src/bigdl/orca/ray/raycontext.py b/python/orca/src/bigdl/orca/ray/raycontext.py index 1b7e8a688fd..82f04845265 100755 --- a/python/orca/src/bigdl/orca/ray/raycontext.py +++ b/python/orca/src/bigdl/orca/ray/raycontext.py @@ -457,6 +457,7 @@ def init(self, driver_cores=0): os.environ.update(self.env) import ray self._address_info = ray.init(num_cpus=self.ray_node_cpu_cores, + redis_password=self.redis_password, object_store_memory=self.object_store_memory, resources=self.extra_params) else: @@ -479,6 +480,10 @@ def address_info(self): else: raise Exception("The Ray cluster has not been launched yet. Please call init first") + @property + def redis_address(self): + return self.address_info["redis_address"] + def _start_cluster(self): print("Start to launch ray on cluster") ray_rdd = self.sc.range(0, self.num_ray_nodes, @@ -489,7 +494,6 @@ def _start_cluster(self): self.ray_processesMonitor = ProcessMonitor(process_infos, self.sc, ray_rdd, self, verbose=self.verbose) - self.redis_address = self.ray_processesMonitor.master.master_addr return self def _start_restricted_worker(self, num_cores, node_ip_address):