allow driver to run in PYTHON_MODE, which is equivalent to serial Python

This commit is contained in:
Robert Nishihara
2016-06-26 13:43:54 -07:00
parent e8e378883a
commit d97bce0d64
5 changed files with 44 additions and 1 deletions
+10
View File
@@ -85,3 +85,13 @@ def throw_exception_fct2():
@ray.remote([float], [int, str, np.ndarray])
def throw_exception_fct3(x):
raise Exception("Test function 3 intentionally failed.")
# test Python mode
@ray.remote([], [np.ndarray])
def python_mode_f():
return np.array([0, 0])
@ray.remote([np.ndarray], [np.ndarray])
def python_mode_g(x):
x[0] = 1
return x