Skip to content

Commit b296609

Browse files
committed
freshness: rearrange, add table
1 parent 170ec27 commit b296609

File tree

1 file changed

+35
-13
lines changed

1 file changed

+35
-13
lines changed

articles/machine-learning/how-to-migrate-from-v1.md

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.subservice: core
88
ms.topic: how-to
99
author: balapv
1010
ms.author: balapv
11-
ms.date: 09/23/2022
11+
ms.date: 02/22/2024
1212
ms.reviewer: sgilley
1313
ms.custom: devplatv2, devx-track-python
1414
monikerRange: 'azureml-api-2 || azureml-api-1'
@@ -46,12 +46,6 @@ You should then ensure the features you need in v2 meet your organization's requ
4646
> [!IMPORTANT]
4747
> New features in Azure Machine Learning will only be launched in v2.
4848
49-
## Should I upgrade existing code to v2
50-
51-
You can reuse your existing assets in your v2 workflows. For instance a model created in v1 can be used to perform Managed Inferencing in v2.
52-
53-
Optionally, if you want to upgrade specific parts of your existing code to v2, please refer to the comparison links provided in the details of each resource or asset in the rest of this document.
54-
5549
## Which v2 API should I use?
5650

5751
In v2 interfaces via REST API, CLI, and Python SDK are available. The interface you should use depends on your scenario and preferences.
@@ -62,15 +56,24 @@ In v2 interfaces via REST API, CLI, and Python SDK are available. The interface
6256
|CLI|Recommended for automation with CI/CD or per personal preference. Allows quick iteration with YAML files and straightforward separation between Azure Machine Learning and ML model code.|
6357
|Python SDK|Recommended for complicated scripting (for example, programmatically generating large pipeline jobs) or per personal preference. Allows quick iteration with YAML files or development solely in Python.|
6458

65-
## Can I use v1 and v2 together?
59+
## Mapping of Python SDK v1 to v2
6660

67-
v1 and v2 can co-exist in a workspace. You can reuse your existing assets in your v2 workflows. For instance a model created in v1 can be used to perform Managed Inferencing in v2. Resources like workspace, compute, and datastore work across v1 and v2, with exceptions. A user can call the v1 Python SDK to change a workspace's description, then using the v2 CLI extension change it again. Jobs (experiments/runs/pipelines in v1) can be submitted to the same workspace from the v1 or v2 Python SDK. A workspace can have both v1 and v2 model deployment endpoints.
61+
See each of the following articles for a comparison code mapping for SDK v1 vs v2.
6862

69-
### Using v1 and v2 code together
70-
We do not recommend using the v1 and v2 SDKs together in the same code. It is technically possible to use v1 and v2 in the same code because they use different Azure namespaces. However, there are many classes with the same name across these namespaces (like Workspace, Model) which can cause confusion and make code readability and debuggability challenging.
63+
|Resources and assets |Article |
64+
|---------|---------|
65+
|Workspace | [Workspace management in SDK v1 and SDK v2](migrate-to-v2-resource-workspace.md) |
66+
|Datastore | [Datastore management in SDK v1 and SDK v2](migrate-to-v2-resource-datastore.md) |
67+
|Compute | [Compute management in SDK v1 and SDK v2](migrate-to-v2-resource-compute.md) |
68+
|Training | [Run a script](migrate-to-v2-command-job.md) |
69+
|Training | [Local runs](migrate-to-v2-local-runs.md) |
70+
|Training | [Hyperparameter tuning](migrate-to-v2-execution-hyperdrive.md) |
71+
|Training | [Parallel Run](migrate-to-v2-execution-parallel-run-step.md) |
72+
|Training | [Pipelines](migrate-to-v2-execution-pipeline.md) |
73+
|Training | [AutoML](migrate-to-v2-execution-automl.md) |
74+
|Data | [Data assets in SDK v1 and v2](migrate-to-v2-assets-data.md) |
75+
| Models | [Model management in SDK v1 and SDK v2](migrate-to-v2-assets-model.md) |
7176

72-
> [!IMPORTANT]
73-
> If your workspace uses a private endpoint, it will automatically have the `v1_legacy_mode` flag enabled, preventing usage of v2 APIs. See [how to configure network isolation with v2](how-to-configure-network-isolation-with-v2.md?view=azureml-api-2&preserve-view=true) for details.
7477

7578
## Resources and assets in v1 and v2
7679

@@ -208,6 +211,25 @@ A key paradigm with v2 is serializing machine learning entities as YAML files fo
208211

209212
You can obtain a YAML representation of any entity with the CLI via `az ml <entity> show --output yaml`. Note that this output will have system-generated properties, which can be ignored or deleted.
210213

214+
## Should I upgrade existing code to v2
215+
216+
You can reuse your existing assets in your v2 workflows. For instance a model created in v1 can be used to perform Managed Inferencing in v2.
217+
218+
Optionally, if you want to upgrade specific parts of your existing code to v2, please refer to the comparison links provided in the details of each resource or asset in the rest of this document.
219+
220+
## Can I use v1 and v2 together?
221+
222+
v1 and v2 can co-exist in a workspace. You can reuse your existing assets in your v2 workflows. For instance a model created in v1 can be used to perform Managed Inferencing in v2. Resources like workspace, compute, and datastore work across v1 and v2, with exceptions. A user can call the v1 Python SDK to change a workspace's description, then using the v2 CLI extension change it again. Jobs (experiments/runs/pipelines in v1) can be submitted to the same workspace from the v1 or v2 Python SDK. A workspace can have both v1 and v2 model deployment endpoints.
223+
224+
### Using v1 and v2 code together
225+
226+
We do not recommend using the v1 and v2 SDKs together in the same code. It is technically possible to use v1 and v2 in the same code because they use different Azure namespaces. However, there are many classes with the same name across these namespaces (like Workspace, Model) which can cause confusion and make code readability and debuggability challenging.
227+
228+
> [!IMPORTANT]
229+
> If your workspace uses a private endpoint, it will automatically have the `v1_legacy_mode` flag enabled, preventing usage of v2 APIs. See [how to configure network isolation with v2](how-to-configure-network-isolation-with-v2.md?view=azureml-api-2&preserve-view=true) for details.
230+
231+
232+
211233
## Next steps
212234

213235
- [Get started with the CLI (v2)](how-to-configure-cli.md?view=azureml-api-2&preserve-view=true)

0 commit comments

Comments
 (0)