[Core] Remove actor arg from executor to allow users to specify actor… (#12239)

* [Core] Remove actor arg from executor to allow users to specify actor arg in their Actor.remote.

* Addressed code review.
This commit is contained in:
SangBin Cho
2020-11-29 22:15:48 -08:00
committed by GitHub
parent 17a6b9bbe7
commit 91d54ef621
+3 -3
View File
@@ -544,14 +544,14 @@ class FunctionActorManager:
worker's internal state to record the executed method.
"""
def actor_method_executor(actor, *args, **kwargs):
def actor_method_executor(__ray_actor, *args, **kwargs):
# Execute the assigned method.
is_bound = (is_class_method(method)
or is_static_method(type(actor), method_name))
or is_static_method(type(__ray_actor), method_name))
if is_bound:
return method(*args, **kwargs)
else:
return method(actor, *args, **kwargs)
return method(__ray_actor, *args, **kwargs)
# Set method_name and method as attributes to the executor closure
# so we can make decision based on these attributes in task executor.