From ba59fb75eaea1f2ebf25c2ce26b3eea5e23aa5df Mon Sep 17 00:00:00 2001 From: "c.gurev@student.utwente.nl" Date: Fri, 1 Nov 2024 16:06:33 +0100 Subject: [PATCH] Commit again --- docker/runner/README.md | 1 - docker/runner/ray-cluster.yaml | 1 - roboteam_ai/src/RL/example_ray_job.py | 5 +---- roboteam_ai/src/RL/ray_jobs.py | 4 ++-- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/docker/runner/README.md b/docker/runner/README.md index 19854b9a4..18bdd178c 100644 --- a/docker/runner/README.md +++ b/docker/runner/README.md @@ -21,7 +21,6 @@ After you have both kubernetes and ray, use the following command to create a cl 'kubectl get pods'-> this is will give you the cluster name Use to forward the needed port to the ray service: kubectl port-forward svc/ 8265:8265 - This is the port that will be used inside ray_jobs.py, where we submit the jobs to ray. diff --git a/docker/runner/ray-cluster.yaml b/docker/runner/ray-cluster.yaml index 13edfdcaf..d49818212 100644 --- a/docker/runner/ray-cluster.yaml +++ b/docker/runner/ray-cluster.yaml @@ -30,7 +30,6 @@ spec: memory: 512Mi command: ["/bin/bash", "-c", "--"] args: ["ray start --head --port=6379 --dashboard-host=0.0.0.0 --block"] - livenessProbe: exec: command: diff --git a/roboteam_ai/src/RL/example_ray_job.py b/roboteam_ai/src/RL/example_ray_job.py index c93bb20a5..e78121a8f 100644 --- a/roboteam_ai/src/RL/example_ray_job.py +++ b/roboteam_ai/src/RL/example_ray_job.py @@ -1,5 +1,4 @@ import ray - #Case 1: the function will be distributed across the ray cluster @ray.remote def compute_square(x): @@ -24,9 +23,7 @@ def increment(self): futures = [compute_square.remote(i) for i in range(10)] results = ray.get(futures) print(f"Results: {results}") - - #Testing case 2, using the class: counter = Counter.remote() future_count = counter.increment.remote() -print(f"Count: {ray.get(future_count)}") \ No newline at end of file +print(f"Count: {ray.get(future_count)}") diff --git a/roboteam_ai/src/RL/ray_jobs.py b/roboteam_ai/src/RL/ray_jobs.py index d19741b27..2d781dc9a 100644 --- a/roboteam_ai/src/RL/ray_jobs.py +++ b/roboteam_ai/src/RL/ray_jobs.py @@ -12,8 +12,8 @@ #result = ray.get(compute_square.remote(4)) #print(result) - - +#result +#iiii job_payload = { "entrypoint": "python3 example_ray_job.py" }