Skip to content

Commit f80ef2e

Browse files
Merge pull request #269723 from santiagxf/santiagxf-patch-1
Update how-to-package-models.md
2 parents 53b3650 + ff4e373 commit f80ef2e

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

articles/machine-learning/how-to-package-models.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,21 @@ The workspace is the top-level resource for Azure Machine Learning, providing a
7676
1. Import the required libraries:
7777

7878
```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
8279
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+
)
8394
```
8495

8596
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
260271

261272
## Package a model that is hosted in a registry
262273

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.
264275

265276
The following code creates a package of the `t5-base` model from a registry:
266277

0 commit comments

Comments
 (0)