Skip to content

Commit 62ec524

Browse files
model integration with DT - revised
1 parent af52a23 commit 62ec524

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

src/machinelearningservices/CHANGELOG.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 2025-12-19
2+
3+
### Azure Machine Learning CLI (v2) v 2.41.0
4+
- `az ml model create`
5+
- Add support for `default_deployment_template` parameter to associate a deployment template with a model.
6+
17
## 2025-11-04
28

39
### Azure Machine Learning CLI (v2) v 2.40.0

src/machinelearningservices/azext_mlv2/manual/_help/_model_help.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ def get_model_help():
4040
text: az ml model create --name my-model --version 1 --path azureml://jobs/c42d2507-4953-4a7c-a4c1-2b5bfe0ac64e/outputs/artifacts/paths/model/ --resource-group my-resource-group --workspace-name my-workspace
4141
- name: Create a model from a datastore 'azureml://datastores/<datastore-name>/paths/<path-to-model-relative-to-the-root-of-the-datastore-location>' using command options
4242
text: az ml model create --name my-model --version 1 --path azureml://datastores/myblobstore/paths/models/cifar10/cifar.pt --resource-group my-resource-group --workspace-name my-workspace
43+
- name: Create a model from a YAML file and override the default deployment template
44+
text: az ml model create --registry-name my-registry --resource-group my-resource-group --file model.yaml --set default_deployment_template.asset_id="azureml://registries/my-registry/deploymenttemplates/my-template/versions/1" --version 3
4345
"""
4446
helps[
4547
"ml model show"

src/machinelearningservices/azext_mlv2/manual/_params/_model_params.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ def load_model_params(self):
6464
c.argument(
6565
"default_deployment_template",
6666
options_list=["--default-deployment-template"],
67-
help="Default deployment template for the model.",
67+
help="Default deployment template for the model. Can be overridden using --set with the format: "
68+
"--set default_deployment_template.asset_id=\"azureml://registries/<registry-name>/deploymenttemplates/<template-name>/versions/<version>\"",
6869
)
6970

7071
with self.argument_context("ml model show") as c:

src/machinelearningservices/azext_mlv2/manual/custom/model.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ def ml_model_create(
6262
params_override.append({"stage": stage})
6363
if datastore:
6464
params_override.append({"datastore": datastore})
65+
if default_deployment_template:
66+
params_override.append({"default_deployment_template": default_deployment_template})
6567

6668
model_info = ModelInfo()
6769
try:

0 commit comments

Comments
 (0)