Update named actor API (#8559)

This commit is contained in:
Edward Oakes
2020-05-24 20:08:03 -05:00
committed by GitHub
parent 92c2e41dfd
commit 860eb6f13a
10 changed files with 109 additions and 140 deletions
+2 -3
View File
@@ -219,8 +219,7 @@ class Counter:
def increment(self):
self.count += 1
return self.count
counter = Counter.remote()
ray.util.register_actor("Counter", counter)
counter = Counter.options(name="Counter").remote()
time.sleep(100)
""".format(address)
@@ -231,7 +230,7 @@ import time
ray.init(address="{}")
while True:
try:
counter = ray.util.get_actor("Counter")
counter = ray.get_actor("Counter")
break
except ValueError:
time.sleep(1)