From f1d28dc2906bb29cd90e56a4dcb65e3a7f5dba09 Mon Sep 17 00:00:00 2001 From: Al Rigazzi Date: Wed, 13 Oct 2021 08:43:32 +0200 Subject: [PATCH] Ray readme fix (#96) --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d25fdb6bc..d450ee8ca 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ independently. - [Online Processing](#online-processing) - [Singular Value Decomposition](#singular-value-decomposition) - [Online Inference](#online-inference) - - [PyTorch CNN Example](#pytorch) + - [PyTorch CNN Example](#pytorch-cnn-example) - [Publications](#publications) - [Cite](#cite) - [bibtex](#bibtex) @@ -445,19 +445,19 @@ allocated nodes. import ray from smartsim import Experiment -from smartsim.ext.ray import RayCluster +from smartsim.exp.ray import RayCluster exp = Experiment("ray-cluster", launcher='slurm') # 3 workers + 1 head node = 4 node-cluster cluster = RayCluster(name="ray-cluster", run_args={}, ray_args={"num-cpus": 24}, - launcher=launcher, workers=3, batch=True) + launcher='slurm', num_nodes=4, batch=True) exp.generate(cluster, overwrite=True) exp.start(cluster, block=False, summary=True) # Connect to the Ray cluster -ray.util.connect(cluster.head_model.address+":10001") +ctx = ray.init("ray://"+cluster.get_head_address()+":10001") # ``` @@ -475,19 +475,19 @@ allocated nodes. import ray from smartsim import Experiment -from smartsim.ext.ray import RayCluster +from smartsim.exp.ray import RayCluster exp = Experiment("ray-cluster", launcher='pbs') # 3 workers + 1 head node = 4 node-cluster cluster = RayCluster(name="ray-cluster", run_args={}, ray_args={"num-cpus": 24}, - launcher=launcher, workers=3, batch=True) + launcher='pbs', num_nodes=4, batch=True) exp.generate(cluster, overwrite=True) exp.start(cluster, block=False, summary=True) # Connect to the ray cluster -ray.util.connect(cluster.head_model.address+":10001") +ctx = ray.init("ray://"+cluster.get_head_address()+":10001") # ```