mirror of
https://github.com/wassname/ray.git
synced 2026-08-09 12:20:09 +08:00
Make actor handles work in Python mode. (#2283)
* Make actor handles work in local mode. * Add test for actor handles in local mode.
This commit is contained in:
committed by
Philipp Moritz
parent
ff2217251f
commit
800f7cc77d
@@ -1189,6 +1189,16 @@ class PythonModeTest(unittest.TestCase):
|
||||
test_array[0] = -1
|
||||
assert_equal(test_array, test_actor.get_array.remote())
|
||||
|
||||
# Check that actor handles work in Python mode.
|
||||
|
||||
@ray.remote
|
||||
def use_actor_handle(handle):
|
||||
array = np.ones(10)
|
||||
handle.set_array.remote(array)
|
||||
assert np.alltrue(array == ray.get(handle.get_array.remote()))
|
||||
|
||||
ray.get(use_actor_handle.remote(test_actor))
|
||||
|
||||
|
||||
class ResourcesTest(unittest.TestCase):
|
||||
def tearDown(self):
|
||||
|
||||
Reference in New Issue
Block a user