Skip to content

Commit e5d8923

Browse files
update (#34040)
1 parent afe666e commit e5d8923

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424
from azure.ai.ml._restclient.v2020_09_01_dataplanepreview import (
2525
AzureMachineLearningWorkspaces as ServiceClient092020DataplanePreview,
2626
)
27-
from azure.ai.ml._restclient.workspace_dataplane import (
28-
AzureMachineLearningWorkspaces as ServiceClientWorkspaceDataplane,
29-
)
3027
from azure.ai.ml._restclient.v2022_02_01_preview import AzureMachineLearningWorkspaces as ServiceClient022022Preview
3128
from azure.ai.ml._restclient.v2022_05_01 import AzureMachineLearningWorkspaces as ServiceClient052022
3229
from azure.ai.ml._restclient.v2022_10_01 import AzureMachineLearningWorkspaces as ServiceClient102022
@@ -40,6 +37,9 @@
4037
# Same object, but was renamed starting in v2023_08_01_preview
4138
from azure.ai.ml._restclient.v2023_10_01 import AzureMachineLearningServices as ServiceClient102023
4239
from azure.ai.ml._restclient.v2024_01_01_preview import AzureMachineLearningWorkspaces as ServiceClient012024Preview
40+
from azure.ai.ml._restclient.workspace_dataplane import (
41+
AzureMachineLearningWorkspaces as ServiceClientWorkspaceDataplane,
42+
)
4343
from azure.ai.ml._scope_dependent_operations import OperationConfig, OperationsContainer, OperationScope
4444
from azure.ai.ml._telemetry.logging_handler import get_appinsights_log_handler
4545
from azure.ai.ml._user_agent import USER_AGENT
@@ -170,8 +170,8 @@ def __init__(
170170
)
171171

172172
self._credential = credential
173-
self._ws_rg = None
174-
self._ws_sub = None
173+
self._ws_rg: Any = None
174+
self._ws_sub: Any = None
175175
show_progress = kwargs.pop("show_progress", True)
176176
enable_telemetry = kwargs.pop("enable_telemetry", True)
177177
self._operation_config = OperationConfig(show_progress=show_progress, enable_telemetry=enable_telemetry)
@@ -753,7 +753,7 @@ def from_config(
753753
error_category=ErrorCategory.USER_ERROR,
754754
)
755755

756-
subscription_id, resource_group, workspace_name = MLClient._get_workspace_info(found_path)
756+
subscription_id, resource_group, workspace_name = MLClient._get_workspace_info(str(found_path))
757757

758758
module_logger.info("Found the config file in: %s", found_path)
759759
return MLClient(
@@ -1009,7 +1009,7 @@ def _get_new_client(self, workspace_name: str, **kwargs) -> "MLClient":
10091009

10101010
@classmethod
10111011
def _get_workspace_info(cls, found_path: Optional[str]) -> Tuple[str, str, str]:
1012-
with open(found_path, encoding=DefaultOpenEncoding.READ) as config_file:
1012+
with open(str(found_path), encoding=DefaultOpenEncoding.READ) as config_file:
10131013
config = json.load(config_file)
10141014

10151015
# Checking the keys in the config.json file to check for required parameters.

sdk/ml/azure-ai-ml/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ exclude = [
4444
"azure/ai/ml/_azure_environments.py",
4545
"azure/ai/ml/exceptions.py",
4646
"azure/ai/ml/_scope_dependent_operations.py",
47-
"azure/ai/ml/_ml_client.py",
4847
"azure/ai/ml/_exception_helper.py",
4948
]
5049
warn_unused_configs = true

0 commit comments

Comments
 (0)