hermetically seal everything, bring it up to date
This commit is contained in:
parent
efd3d65269
commit
03beb6970c
12 changed files with 723 additions and 77 deletions
17
python/client.py
Normal file
17
python/client.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
from ray import ray
|
||||
|
||||
ray.connect("localhost:50050")
|
||||
|
||||
@ray.remote
|
||||
def plus2(x):
|
||||
return x + 2
|
||||
|
||||
print(ray.get(plus2.remote(4)))
|
||||
|
||||
@ray.remote
|
||||
def fact(x):
|
||||
if x <= 0:
|
||||
return 1
|
||||
return x * ray.get(fact.remote(x - 1))
|
||||
|
||||
print(ray.get(fact.remote(20)))
|
||||
Loading…
Add table
Add a link
Reference in a new issue