Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
Michaelvll committed Apr 22, 2024
1 parent 31dc1c8 commit e932498
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions sky/backends/cloud_vm_ray_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,11 @@ def get_or_fail(futures, pg) -> List[int]:
returncodes = [1] * len(futures)
# Wait for 1 task to be ready.
ready = []
# Recall ray.wait if ready is empty. This is because ray.wait
# with timeout=None will only wait for 10**6 seconds, which will
# cause the task longer than 12 days returned before it is
# ready. Reference: https://github.com/ray-project/ray/blob/ray-2.9.3/python/ray/_private/worker.py#L2845-L2846
# Keep invoking ray.wait if ready is empty. This is because
# ray.wait with timeout=None will only wait for 10**6 seconds,
# which will cause the task longer than 12 days returned before
# it is ready.
# Reference: https://github.com/ray-project/ray/blob/ray-2.9.3/python/ray/_private/worker.py#L2845-L2846
while not ready:
ready, unready = ray.wait(futures)
idx = futures.index(ready[0])
Expand Down

0 comments on commit e932498

Please sign in to comment.