[minor] Perf optimizations for direct actor task submission (#6044)

* merge optimizations

* fix

* fix memory err

* optimize

* fix tests

* fix serialization of method handles

* document weakref

* fix check

* bazel format

* disable on 2
This commit is contained in:
Eric Liang
2019-11-01 14:41:14 -07:00
committed by GitHub
parent eef4ad3bba
commit fb34928a2a
16 changed files with 157 additions and 118 deletions
+5 -5
View File
@@ -10,19 +10,19 @@ import ray
filter_pattern = os.environ.get("TESTS_TO_RUN", "")
@ray.remote
@ray.remote(num_cpus=0)
class Actor(object):
def small_value(self):
return 0
return b"ok"
def small_value_arg(self, x):
return 0
return b"ok"
def small_value_batch(self, n):
ray.get([small_value.remote() for _ in range(n)])
@ray.remote
@ray.remote(num_cpus=0)
class Client(object):
def __init__(self, servers):
if not isinstance(servers, list):
@@ -45,7 +45,7 @@ class Client(object):
@ray.remote
def small_value():
return 0
return b"ok"
@ray.remote