|
12 | 12 | from pathlib import Path
|
13 | 13 | from typing import Any, Optional, Tuple, TypeVar, Union
|
14 | 14 |
|
15 |
| -from azure.core.credentials import TokenCredential |
16 |
| -from azure.core.polling import LROPoller |
17 |
| - |
18 | 15 | from azure.ai.ml._azure_environments import (
|
19 | 16 | CloudArgumentKeys,
|
20 | 17 | _add_cloud_to_environments,
|
|
27 | 24 | from azure.ai.ml._restclient.v2020_09_01_dataplanepreview import (
|
28 | 25 | AzureMachineLearningWorkspaces as ServiceClient092020DataplanePreview,
|
29 | 26 | )
|
30 |
| - |
31 |
| -from azure.ai.ml._restclient.v2022_02_01_preview import ( |
32 |
| - AzureMachineLearningWorkspaces as ServiceClient022022Preview, |
33 |
| -) |
34 |
| -from azure.ai.ml._restclient.v2022_05_01 import ( |
35 |
| - AzureMachineLearningWorkspaces as ServiceClient052022, |
36 |
| -) |
37 |
| -from azure.ai.ml._restclient.v2022_10_01 import ( |
38 |
| - AzureMachineLearningWorkspaces as ServiceClient102022, |
39 |
| -) |
40 |
| -from azure.ai.ml._restclient.v2022_10_01_preview import ( |
41 |
| - AzureMachineLearningWorkspaces as ServiceClient102022Preview, |
42 |
| -) |
43 |
| -from azure.ai.ml._restclient.v2023_02_01_preview import ( |
44 |
| - AzureMachineLearningWorkspaces as ServiceClient022023Preview, |
45 |
| -) |
46 |
| -from azure.ai.ml._restclient.v2023_04_01 import ( |
47 |
| - AzureMachineLearningWorkspaces as ServiceClient042023, |
48 |
| -) |
49 |
| -from azure.ai.ml._restclient.v2023_04_01_preview import ( |
50 |
| - AzureMachineLearningWorkspaces as ServiceClient042023Preview, |
51 |
| -) |
52 |
| -from azure.ai.ml._restclient.v2023_06_01_preview import ( |
53 |
| - AzureMachineLearningWorkspaces as ServiceClient062023Preview, |
54 |
| -) |
55 |
| -from azure.ai.ml._scope_dependent_operations import ( |
56 |
| - OperationConfig, |
57 |
| - OperationsContainer, |
58 |
| - OperationScope, |
59 |
| -) |
| 27 | +from azure.ai.ml._restclient.v2022_02_01_preview import AzureMachineLearningWorkspaces as ServiceClient022022Preview |
| 28 | +from azure.ai.ml._restclient.v2022_05_01 import AzureMachineLearningWorkspaces as ServiceClient052022 |
| 29 | +from azure.ai.ml._restclient.v2022_10_01 import AzureMachineLearningWorkspaces as ServiceClient102022 |
| 30 | +from azure.ai.ml._restclient.v2022_10_01_preview import AzureMachineLearningWorkspaces as ServiceClient102022Preview |
| 31 | +from azure.ai.ml._restclient.v2023_02_01_preview import AzureMachineLearningWorkspaces as ServiceClient022023Preview |
| 32 | +from azure.ai.ml._restclient.v2023_04_01 import AzureMachineLearningWorkspaces as ServiceClient042023 |
| 33 | +from azure.ai.ml._restclient.v2023_04_01_preview import AzureMachineLearningWorkspaces as ServiceClient042023Preview |
| 34 | +from azure.ai.ml._restclient.v2023_06_01_preview import AzureMachineLearningWorkspaces as ServiceClient062023Preview |
| 35 | +from azure.ai.ml._scope_dependent_operations import OperationConfig, OperationsContainer, OperationScope |
60 | 36 | from azure.ai.ml._telemetry.logging_handler import get_appinsights_log_handler
|
61 | 37 | from azure.ai.ml._user_agent import USER_AGENT
|
62 | 38 | from azure.ai.ml._utils._experimental import experimental
|
|
103 | 79 | )
|
104 | 80 | from azure.ai.ml.operations._code_operations import CodeOperations
|
105 | 81 | from azure.ai.ml.operations._feature_set_operations import FeatureSetOperations
|
106 |
| -from azure.ai.ml.operations._feature_store_entity_operations import ( |
107 |
| - FeatureStoreEntityOperations, |
108 |
| -) |
| 82 | +from azure.ai.ml.operations._feature_store_entity_operations import FeatureStoreEntityOperations |
109 | 83 | from azure.ai.ml.operations._feature_store_operations import FeatureStoreOperations
|
110 | 84 | from azure.ai.ml.operations._local_deployment_helper import _LocalDeploymentHelper
|
111 | 85 | from azure.ai.ml.operations._local_endpoint_helper import _LocalEndpointHelper
|
112 | 86 | from azure.ai.ml.operations._schedule_operations import ScheduleOperations
|
113 |
| -from azure.ai.ml.operations._workspace_outbound_rule_operations import ( |
114 |
| - WorkspaceOutboundRuleOperations, |
115 |
| -) |
| 87 | +from azure.ai.ml.operations._workspace_outbound_rule_operations import WorkspaceOutboundRuleOperations |
| 88 | +from azure.core.credentials import TokenCredential |
| 89 | +from azure.core.polling import LROPoller |
116 | 90 |
|
117 | 91 | module_logger = logging.getLogger(__name__)
|
118 | 92 |
|
@@ -563,9 +537,7 @@ def __init__(
|
563 | 537 | self._operation_container.add(AzureMLResourceType.SCHEDULE, self._schedules)
|
564 | 538 |
|
565 | 539 | try:
|
566 |
| - from azure.ai.ml.operations._virtual_cluster_operations import ( |
567 |
| - VirtualClusterOperations, |
568 |
| - ) |
| 540 | + from azure.ai.ml.operations._virtual_cluster_operations import VirtualClusterOperations |
569 | 541 |
|
570 | 542 | self._virtual_clusters = VirtualClusterOperations(
|
571 | 543 | self._operation_scope,
|
@@ -625,9 +597,17 @@ def from_config(
|
625 | 597 | """Returns a client from an existing Azure Machine Learning Workspace using a file configuration.
|
626 | 598 |
|
627 | 599 | This method provides a simple way to reuse the same workspace across multiple Python notebooks or projects.
|
628 |
| - Users can save the workspace Azure Resource Manager (ARM) properties using the |
629 |
| - [workspace.write_config](https://aka.ms/ml-workspace-class) method, |
630 |
| - and use this method to load the same workspace in different Python notebooks or projects without |
| 600 | + You can save a workspace's Azure Resource Manager (ARM) properties in a JSON configuration file using this |
| 601 | + format: |
| 602 | +
|
| 603 | + .. code-block:: json |
| 604 | + { |
| 605 | + "subscription_id": "<subscription-id>", |
| 606 | + "resource_group": "<resource-group>", |
| 607 | + "workspace_name": "<workspace-name>" |
| 608 | + } |
| 609 | +
|
| 610 | + Then, you can use this method to load the same workspace in different Python notebooks or projects without |
631 | 611 | retyping the workspace ARM properties.
|
632 | 612 |
|
633 | 613 | :param credential: The credential object for the workspace.
|
|
0 commit comments