mirror of
https://github.com/wassname/ray.git
synced 2026-09-12 12:51:15 +08:00
Fix actor handle id creation when actor handle was pickled (#3074)
This commit is contained in:
committed by
Robert Nishihara
parent
3c0803e7e9
commit
2c52d9dfa0
@@ -1968,6 +1968,28 @@ def test_pickling_actor_handle(ray_start_regular):
|
||||
ray.get(new_f.method.remote())
|
||||
|
||||
|
||||
def test_pickled_actor_handle_call_in_method_twice(ray_start_regular):
|
||||
@ray.remote
|
||||
class Actor1(object):
|
||||
def f(self):
|
||||
return 1
|
||||
|
||||
@ray.remote
|
||||
class Actor2(object):
|
||||
def __init__(self, constructor):
|
||||
self.actor = constructor()
|
||||
|
||||
def step(self):
|
||||
ray.get(self.actor.f.remote())
|
||||
|
||||
a = Actor1.remote()
|
||||
|
||||
b = Actor2.remote(lambda: a)
|
||||
|
||||
ray.get(b.step.remote())
|
||||
ray.get(b.step.remote())
|
||||
|
||||
|
||||
def test_register_and_get_named_actors(ray_start_regular):
|
||||
# TODO(heyucongtom): We should test this from another driver.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user