Allow remote decorator to be used with no parentheses.

This commit is contained in:
Robert Nishihara
2016-08-30 16:38:26 -07:00
parent ce4e5ec544
commit fb7ccef493
22 changed files with 193 additions and 175 deletions
+2 -2
View File
@@ -76,7 +76,7 @@ class TaskStatusTest(unittest.TestCase):
return reducer, ()
def __call__(self):
return
ray.remote()(Foo())
ray.remote(Foo())
for _ in range(100): # Retry if we need to wait longer.
if len(ray.task_info()["failed_remote_function_imports"]) >= 1:
break
@@ -112,7 +112,7 @@ class TaskStatusTest(unittest.TestCase):
def reinitializer(foo):
raise Exception("The reinitializer failed.")
ray.reusables.foo = ray.Reusable(initializer, reinitializer)
@ray.remote()
@ray.remote
def use_foo():
ray.reusables.foo
use_foo.remote()