Skip to content

Commit

Permalink
Commit again
Browse files Browse the repository at this point in the history
  • Loading branch information
crinagurev committed Nov 1, 2024
1 parent 6be3014 commit ba59fb7
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
1 change: 0 additions & 1 deletion docker/runner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<cluster name> 8265:8265

This is the port that will be used inside ray_jobs.py, where we submit the jobs to ray.


Expand Down
1 change: 0 additions & 1 deletion docker/runner/ray-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 1 addition & 4 deletions roboteam_ai/src/RL/example_ray_job.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import ray

#Case 1: the function will be distributed across the ray cluster
@ray.remote
def compute_square(x):
Expand All @@ -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)}")
print(f"Count: {ray.get(future_count)}")
4 changes: 2 additions & 2 deletions roboteam_ai/src/RL/ray_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#result = ray.get(compute_square.remote(4))
#print(result)



#result
#iiii
job_payload = {
"entrypoint": "python3 example_ray_job.py"
}
Expand Down

0 comments on commit ba59fb7

Please sign in to comment.