|
24 | 24 | from azure.ai.ml._restclient.v2020_09_01_dataplanepreview import (
|
25 | 25 | AzureMachineLearningWorkspaces as ServiceClient092020DataplanePreview,
|
26 | 26 | )
|
27 |
| -from azure.ai.ml._restclient.workspace_dataplane import ( |
28 |
| - AzureMachineLearningWorkspaces as ServiceClientWorkspaceDataplane, |
29 |
| -) |
30 | 27 | from azure.ai.ml._restclient.v2022_02_01_preview import AzureMachineLearningWorkspaces as ServiceClient022022Preview
|
31 | 28 | from azure.ai.ml._restclient.v2022_05_01 import AzureMachineLearningWorkspaces as ServiceClient052022
|
32 | 29 | from azure.ai.ml._restclient.v2022_10_01 import AzureMachineLearningWorkspaces as ServiceClient102022
|
|
40 | 37 | # Same object, but was renamed starting in v2023_08_01_preview
|
41 | 38 | from azure.ai.ml._restclient.v2023_10_01 import AzureMachineLearningServices as ServiceClient102023
|
42 | 39 | 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 | +) |
43 | 43 | from azure.ai.ml._scope_dependent_operations import OperationConfig, OperationsContainer, OperationScope
|
44 | 44 | from azure.ai.ml._telemetry.logging_handler import get_appinsights_log_handler
|
45 | 45 | from azure.ai.ml._user_agent import USER_AGENT
|
@@ -170,8 +170,8 @@ def __init__(
|
170 | 170 | )
|
171 | 171 |
|
172 | 172 | 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 |
175 | 175 | show_progress = kwargs.pop("show_progress", True)
|
176 | 176 | enable_telemetry = kwargs.pop("enable_telemetry", True)
|
177 | 177 | self._operation_config = OperationConfig(show_progress=show_progress, enable_telemetry=enable_telemetry)
|
@@ -753,7 +753,7 @@ def from_config(
|
753 | 753 | error_category=ErrorCategory.USER_ERROR,
|
754 | 754 | )
|
755 | 755 |
|
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)) |
757 | 757 |
|
758 | 758 | module_logger.info("Found the config file in: %s", found_path)
|
759 | 759 | return MLClient(
|
@@ -1009,7 +1009,7 @@ def _get_new_client(self, workspace_name: str, **kwargs) -> "MLClient":
|
1009 | 1009 |
|
1010 | 1010 | @classmethod
|
1011 | 1011 | 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: |
1013 | 1013 | config = json.load(config_file)
|
1014 | 1014 |
|
1015 | 1015 | # Checking the keys in the config.json file to check for required parameters.
|
|
0 commit comments