From 91d54ef621e16fc69e7f86800ded3ee60fd8b7f9 Mon Sep 17 00:00:00 2001 From: SangBin Cho Date: Sun, 29 Nov 2020 22:15:48 -0800 Subject: [PATCH] =?UTF-8?q?[Core]=20Remove=20actor=20arg=20from=20executor?= =?UTF-8?q?=20to=20allow=20users=20to=20specify=20actor=E2=80=A6=20(#12239?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [Core] Remove actor arg from executor to allow users to specify actor arg in their Actor.remote. * Addressed code review. --- python/ray/function_manager.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/ray/function_manager.py b/python/ray/function_manager.py index f3fe576d5..b4ae0b104 100644 --- a/python/ray/function_manager.py +++ b/python/ray/function_manager.py @@ -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.