From c82b2e53d4110b7399ea05345c5049074d16d263 Mon Sep 17 00:00:00 2001 From: va6996 Date: Tue, 21 May 2024 11:31:58 -0700 Subject: [PATCH] revert minor changes --- flytekit/clis/sdk_in_container/run.py | 2 +- flytekit/remote/remote.py | 8 ++++---- tests/flytekit/integration/remote/test_remote.py | 2 -- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/flytekit/clis/sdk_in_container/run.py b/flytekit/clis/sdk_in_container/run.py index 7bf4e1f4cc8..a887ca8c52c 100644 --- a/flytekit/clis/sdk_in_container/run.py +++ b/flytekit/clis/sdk_in_container/run.py @@ -250,7 +250,7 @@ class RunLevelParams(PyFlyteParams): ) cluster_pool: str = make_click_option_field( click.Option( - param_decls=["--cluster-pool"], + param_decls=["--cluster-pool", "cluster_pool"], required=False, type=str, default="", diff --git a/flytekit/remote/remote.py b/flytekit/remote/remote.py index 1fe5af792a3..030665238d7 100644 --- a/flytekit/remote/remote.py +++ b/flytekit/remote/remote.py @@ -1113,7 +1113,7 @@ def _execute( :param envs: Environment variables to set for the execution. :param tags: Tags to set for the execution. :param cluster_pool: Specify cluster pool on which newly created execution should be placed. - :param execution_cluster_label: Specify cluster on which newly created execution should be placed. + :param execution_cluster_label: Specify label of cluster(s) on which newly created execution should be placed. :returns: :class:`~flytekit.remote.workflow_execution.FlyteWorkflowExecution` """ if execution_name is not None and execution_name_prefix is not None: @@ -1294,7 +1294,7 @@ def execute( :param envs: Environment variables to be set for the execution. :param tags: Tags to be set for the execution. :param cluster_pool: Specify cluster pool on which newly created execution should be placed. - :param execution_cluster_label: Specify cluster on which newly created execution should be placed. + :param execution_cluster_label: Specify label of cluster(s) on which newly created execution should be placed. .. note: @@ -1713,7 +1713,7 @@ def execute_local_task( :param envs: Environment variables to set for the execution. :param tags: Tags to set for the execution. :param cluster_pool: Specify cluster pool on which newly created execution should be placed. - :param execution_cluster_label: Specify cluster on which newly created execution should be placed. + :param execution_cluster_label: Specify label of cluster(s) on which newly created execution should be placed. :return: FlyteWorkflowExecution object. """ resolved_identifiers = self._resolve_identifier_kwargs(entity, project, domain, name, version) @@ -1868,7 +1868,7 @@ def execute_local_launch_plan( :param envs: Environment variables to be passed into the execution. :param tags: Tags to be passed into the execution. :param cluster_pool: Specify cluster pool on which newly created execution should be placed. - :param execution_cluster_label: Specify cluster on which newly created execution should be placed. + :param execution_cluster_label: Specify label of cluster(s) on which newly created execution should be placed. :return: FlyteWorkflowExecution object """ resolved_identifiers = self._resolve_identifier_kwargs(entity, project, domain, name, version) diff --git a/tests/flytekit/integration/remote/test_remote.py b/tests/flytekit/integration/remote/test_remote.py index 1b7c644206a..78b30c8276a 100644 --- a/tests/flytekit/integration/remote/test_remote.py +++ b/tests/flytekit/integration/remote/test_remote.py @@ -214,14 +214,12 @@ def test_execute_python_task(register): envs={"foo": "bar"}, tags=["flyte"], cluster_pool="gpu", - execution_cluster_label="label", ) assert execution.outputs["t1_int_output"] == 12 assert execution.outputs["c"] == "world" assert execution.spec.envs.envs == {"foo": "bar"} assert execution.spec.tags == ["flyte"] assert execution.spec.cluster_assignment.cluster_pool == "gpu" - assert execution.spec.execution_cluster_label.value == "label" def test_execute_python_workflow_and_launch_plan(register):