From 8362029dcfe5c71db8a76e8b3f567a958f993dcc Mon Sep 17 00:00:00 2001 From: fangfengbin <869218239a@zju.edu.cn> Date: Sun, 23 Aug 2020 03:12:00 +0800 Subject: [PATCH] [Placement Group]Fix CrossLanguageInvocationTest failure (#10257) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add part code * rebase master * add part code * rebase master Co-authored-by: 灵洵 --- python/ray/cross_language.py | 2 +- python/ray/worker.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/python/ray/cross_language.py b/python/ray/cross_language.py index ebd893f57..4ce289a41 100644 --- a/python/ray/cross_language.py +++ b/python/ray/cross_language.py @@ -69,7 +69,7 @@ def java_function(class_name, function_name): None, # num_return_vals, None, # max_calls, None, # max_retries - placement_group_id=None, + placement_group=None, # TODO(ekl) set default to -1 once we support -1 as "any index" placement_group_bundle_index=0) diff --git a/python/ray/worker.py b/python/ray/worker.py index f3fa074e8..547581a06 100644 --- a/python/ray/worker.py +++ b/python/ray/worker.py @@ -1787,7 +1787,7 @@ def make_decorator(num_return_vals=None, max_restarts=None, max_task_retries=None, worker=None, - placement_group_id=None, + placement_group=None, placement_group_bundle_index=-1): def decorator(function_or_class): if (inspect.isfunction(function_or_class) @@ -1803,7 +1803,7 @@ def make_decorator(num_return_vals=None, return ray.remote_function.RemoteFunction( Language.PYTHON, function_or_class, None, num_cpus, num_gpus, memory, object_store_memory, resources, num_return_vals, - max_calls, max_retries, placement_group_id, + max_calls, max_retries, placement_group, placement_group_bundle_index) if inspect.isclass(function_or_class): @@ -1875,7 +1875,7 @@ def remote(*args, **kwargs): number of times that the remote function should be rerun when the worker process executing it crashes unexpectedly. The minimum valid value is 0, the default is 4 (default), and a value of -1 indicates infinite retries. - * **placement_group_id**: the placement group this task belongs to, + * **placement_group**: the placement group this task belongs to, or None if it doesn't belong to any group. * **placement_group_bundle_index**: the index of the bundle if the task belongs to a placement group, which may be -1 to indicate @@ -1944,7 +1944,7 @@ def remote(*args, **kwargs): "max_restarts", "max_task_retries", "max_retries", - "placement_group_id", + "placement_group", "placement_group_bundle_index", ], error_string