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-package-models.md
+15-4Lines changed: 15 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,10 +76,21 @@ The workspace is the top-level resource for Azure Machine Learning, providing a
76
76
1. Import the required libraries:
77
77
78
78
```python
79
-
from azure.ai.ml import MLClient, Input
80
-
from azure.ai.ml.entities import ManagedOnlineEndpoint, ManagedOnlineDeployment, Model
81
-
from azure.ai.ml.constants import AssetTypes
82
79
from azure.identity import DefaultAzureCredential
80
+
from azure.ai.ml import MLClient
81
+
from azure.ai.ml.entities import (
82
+
AzureMLOnlineInferencingServer,
83
+
ModelPackage,
84
+
CodeConfiguration,
85
+
BaseEnvironment,
86
+
ModelConfiguration,
87
+
)
88
+
from azure.ai.ml.entities import (
89
+
ManagedOnlineEndpoint,
90
+
ManagedOnlineDeployment,
91
+
Environment,
92
+
Model,
93
+
)
83
94
```
84
95
85
96
2. If you're running in a compute instance in Azure Machine Learning, create an `MLClient` as follows:
@@ -260,7 +271,7 @@ If you're using an MLflow model, model dependencies are indicated inside the mod
260
271
261
272
## Package a model that is hosted in a registry
262
273
263
-
Model packages provide a convenient way to collect dependencies before deployment. However, when models are hosted in registries, the deployment target is usually another workspace. When creating packages in this setup, use the `target_environment_name`property to specify the full location where you want the model package to be created, instead of just its name.
274
+
Model packages provide a convenient way to collect dependencies before deployment. However, when models are hosted in registries, the deployment target is usually another workspace. When creating packages in this setup, use the `target_environment`property to specify the full location where you want the model package to be created, instead of just its name.
264
275
265
276
The following code creates a package of the `t5-base` model from a registry:
0 commit comments