Last active
January 28, 2020 00:37
-
-
Save deanwampler/2d6630115693f71e61b8335ef5b01404 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ids = [busy.remote(0) for i in times] # New set of ids, but now 0 is passed to busy in all cases | |
for i in range(1,40): | |
num_returns = 2 if len(ids) >= 2 else len(ids) | |
ready, not_ready = ray.wait(ids, num_returns = num_returns) | |
print('iteration:', i) | |
print('Ready length, values: ', len(ready), ray.get(ready)) | |
print('Not Ready length:', len(not_ready)) | |
ids = not_ready | |
if not ids: | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment