Skip to content

Instantly share code, notes, and snippets.

@clarng
Last active February 18, 2023 22:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clarng/e4b7f538e518aa95a867903f5da09b3b to your computer and use it in GitHub Desktop.
Save clarng/e4b7f538e518aa95a867903f5da09b3b to your computer and use it in GitHub Desktop.
import ray
@ray.remote
def task_submitted_by_driver():
futures = [leaf_task.remote() for _ in range(4)]
ray.get(futures)
@ray.remote
def leaf_task():
print("running leaf task")
pass
tasks = [task_submitted_by_driver.remote() for _ in range(2)]
ray.get(tasks)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment