Skip to content

Instantly share code, notes, and snippets.

@bllchmbrs
Last active April 20, 2020 18:32
Show Gist options
  • Save bllchmbrs/827fb6415d83472bfe60007992a57843 to your computer and use it in GitHub Desktop.
Save bllchmbrs/827fb6415d83472bfe60007992a57843 to your computer and use it in GitHub Desktop.
import ray
import time
from datetime import datetime as dt
@ray.remote
def adder(x):
return x+1
def timer(values):
start = dt.now()
return_value = ray.get(values)
end = dt.now()
print("Return Value: {}".format(return_value))
print("Elapsed Time: {}".format((end-start).total_seconds()))
return return_value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment