Last active
April 20, 2020 18:32
-
-
Save bllchmbrs/827fb6415d83472bfe60007992a57843 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
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