From 5484aa3746b649da3e97b16708e9f34d46a86d8c Mon Sep 17 00:00:00 2001 From: Hanchi Wang Date: Sat, 26 Aug 2023 10:17:17 +0800 Subject: [PATCH] Fix byo aoai resource positional arg (#31822) * Fix positional arg --- .../azure/ai/ml/operations/_workspace_operations_base.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_workspace_operations_base.py b/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_workspace_operations_base.py index 59e76d9f5ad2..55ab69a4bd50 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_workspace_operations_base.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_workspace_operations_base.py @@ -80,7 +80,7 @@ def begin_create( ) -> LROPoller[Workspace]: existing_workspace = None resource_group = kwargs.get("resource_group") or workspace.resource_group or self._resource_group_name - byo_open_ai_resource_id = kwargs.get("byo_open_ai_resource_id") or "" + byo_open_ai_resource_id = kwargs.pop("byo_open_ai_resource_id", "") try: existing_workspace = self.get(workspace.name, resource_group=resource_group) @@ -118,9 +118,7 @@ def begin_create( template, param, resources_being_deployed, - ) = self._populate_arm_paramaters( # pylint: disable=too-many-function-args - workspace, byo_open_ai_resource_id, **kwargs - ) + ) = self._populate_arm_paramaters(workspace, byo_open_ai_resource_id=byo_open_ai_resource_id, **kwargs) # check if create with workspace hub request is valid if workspace._kind == PROJECT_WORKSPACE_KIND: if not all(