You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/machine-learning/how-to-manage-models.md
+60Lines changed: 60 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,26 @@ Azure Machine Learning allows you to work with different types of models. In thi
29
29
* The Azure Machine Learning [SDK v2 for Python](https://aka.ms/sdk-v2-install).
30
30
* The Azure Machine Learning [CLI v2](how-to-configure-cli.md).
31
31
32
+
Additionally, you will need to:
33
+
34
+
# [Azure CLI](#tab/cli)
35
+
36
+
- Install the Azure CLI and the ml extension to the Azure CLI. For more information, see [Install, set up, and use the CLI (v2)](how-to-configure-cli.md).
37
+
38
+
# [Python (Azure ML SDK)](#tab/sdk)
39
+
40
+
- Install the Azure Machine Learning SDK for Python
41
+
42
+
```bash
43
+
pip install azure-ai-ml
44
+
```
45
+
46
+
# [Studio](#tab/studio)
47
+
48
+
There are no additional prerequisites when working in Azure Machine Learning studio.
49
+
50
+
---
51
+
32
52
## Supported paths
33
53
34
54
When you provide a model you want to register, you'll need to specify a `path` parameter that points to the data or job location. Below is a table that shows the different data locations supported in Azure Machine Learning and examples for the `path` parameter:
@@ -76,6 +96,46 @@ These snippets use `custom` and `mlflow`.
76
96
- `custom` is a type that refers to a model file or folder trained with a custom standard not currently supported by Azure ML.
77
97
- `mlflow` is a type that refers to a model trained with [mlflow](how-to-use-mlflow-cli-runs.md). MLflow trained models are in a folder that contains the *MLmodel* file, the *model* file, the *conda dependencies* file, and the *requirements.txt* file.
78
98
99
+
### Connect to your workspace
100
+
101
+
First, let's connect to Azure Machine Learning workspace where we are going to work on.
102
+
103
+
# [Azure CLI](#tab/cli)
104
+
105
+
```azurecli
106
+
az account set --subscription <subscription>
107
+
az configure --defaults workspace=<workspace> group=<resource-group> location=<location>
108
+
```
109
+
110
+
# [Python (Azure ML SDK)](#tab/sdk)
111
+
112
+
The workspace is the top-level resource forAzure Machine Learning, providing a centralized place to work with all the artifacts you create when you use Azure Machine Learning. In this section, we'll connect to the workspacein which you'll perform deployment tasks.
113
+
114
+
1. Import the required libraries:
115
+
116
+
```python
117
+
from azure.ai.ml import MLClient, Input
118
+
from azure.ai.ml.entities import Model
119
+
from azure.ai.ml.constants import AssetTypes
120
+
from azure.identity import DefaultAzureCredential
121
+
```
122
+
123
+
2. Configure workspace details and get a handle to the workspace:
0 commit comments