Skip to content

Instantly share code, notes, and snippets.

@bllchmbrs
Last active April 20, 2020 18:32
Show Gist options
  • Save bllchmbrs/1c90a3dc4ba5a4b438f1848f0dba0b18 to your computer and use it in GitHub Desktop.
Save bllchmbrs/1c90a3dc4ba5a4b438f1848f0dba0b18 to your computer and use it in GitHub Desktop.
import ray
from utils import adder, timer
if __name__ == '__main__':
ray.init(address='auto')
# ray.init(num_cpus=2)
values = range(10)
new_values = [adder.remote(x) for x in values]
timer(new_values)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment