mirror of
https://github.com/wassname/ray.git
synced 2026-06-27 20:38:19 +08:00
[Placement Group] Remove useless placement group argument in ray remote (#11389)
* remove useless placement_group argument in @ray_remote * remove
This commit is contained in:
@@ -65,9 +65,7 @@ class RemoteFunction:
|
||||
|
||||
def __init__(self, language, function, function_descriptor, num_cpus,
|
||||
num_gpus, memory, object_store_memory, resources,
|
||||
accelerator_type, num_returns, max_calls, max_retries,
|
||||
placement_group, placement_group_bundle_index,
|
||||
placement_group_capture_child_tasks):
|
||||
accelerator_type, num_returns, max_calls, max_retries):
|
||||
self._language = language
|
||||
self._function = function
|
||||
self._function_name = (
|
||||
|
||||
+2
-19
@@ -1681,10 +1681,7 @@ def make_decorator(num_returns=None,
|
||||
max_retries=None,
|
||||
max_restarts=None,
|
||||
max_task_retries=None,
|
||||
worker=None,
|
||||
placement_group=None,
|
||||
placement_group_bundle_index=-1,
|
||||
placement_group_capture_child_tasks=True):
|
||||
worker=None):
|
||||
def decorator(function_or_class):
|
||||
if (inspect.isfunction(function_or_class)
|
||||
or is_cython(function_or_class)):
|
||||
@@ -1713,9 +1710,7 @@ def make_decorator(num_returns=None,
|
||||
return ray.remote_function.RemoteFunction(
|
||||
Language.PYTHON, function_or_class, None, num_cpus, num_gpus,
|
||||
memory, object_store_memory, resources, accelerator_type,
|
||||
num_returns, max_calls, max_retries, placement_group,
|
||||
placement_group_bundle_index,
|
||||
placement_group_capture_child_tasks)
|
||||
num_returns, max_calls, max_retries)
|
||||
|
||||
if inspect.isclass(function_or_class):
|
||||
if num_returns is not None:
|
||||
@@ -1839,15 +1834,6 @@ def remote(*args, **kwargs):
|
||||
crashes unexpectedly. The minimum valid value is 0,
|
||||
the default is 4 (default), and a value of -1 indicates
|
||||
infinite retries.
|
||||
placement_group (:obj:`PlacementGroup`): The placement group
|
||||
this task belongs to, or ``None`` if it doesn't belong
|
||||
to any group.
|
||||
placement_group_bundle_index (int): The index of the bundle
|
||||
if the task belongs to a placement group, which may be
|
||||
-1 to indicate any available bundle.
|
||||
placement_group_capture_child_tasks (bool): Default True.
|
||||
If True, all the child tasks (including actor creation)
|
||||
are scheduled in the same placement group.
|
||||
|
||||
"""
|
||||
worker = global_worker
|
||||
@@ -1879,9 +1865,6 @@ def remote(*args, **kwargs):
|
||||
"max_restarts",
|
||||
"max_task_retries",
|
||||
"max_retries",
|
||||
"placement_group",
|
||||
"placement_group_bundle_index",
|
||||
"placement_group_capture_child_tasks",
|
||||
], error_string
|
||||
|
||||
num_cpus = kwargs["num_cpus"] if "num_cpus" in kwargs else None
|
||||
|
||||
Reference in New Issue
Block a user