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:
Robert Nishihara
2018-06-20 23:02:41 -07:00
committed by Philipp Moritz
parent ff2217251f
commit 800f7cc77d
2 changed files with 18 additions and 4 deletions
+10
View File
@@ -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):