[ML] Deployment templates bug fixes#9666
[ML] Deployment templates bug fixes#9666PratibhaShrivastav18 wants to merge 2 commits intoAzure:mainfrom
Conversation
|
Validation for Breaking Change Starting...
Thanks for your contribution! |
|
Hi @PratibhaShrivastav18, |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this comment.
Pull request overview
This PR targets bug fixes in the machinelearningservices extension around deployment template commands, specifically stabilizing update when optional fields are missing and restoring usable -o table output for list.
Changes:
- Avoid
KeyErrorinaz ml deployment-template updatewhentags/descriptionare absent. - Add a table transformer for
az ml deployment-template listand wire it into the command registration. - Document the fixes in the extension changelog.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/machinelearningservices/azext_mlv2/manual/custom/deployment_template.py |
Adjusts update logic to avoid KeyError for missing optional fields. |
src/machinelearningservices/azext_mlv2/manual/commands.py |
Registers a table_transformer for ml deployment-template list. |
src/machinelearningservices/azext_mlv2/manual/_format.py |
Introduces transform_deployment_template_list for table output formatting. |
src/machinelearningservices/CHANGELOG.rst |
Adds an Unreleased entry describing the fixes. |
src/machinelearningservices/azext_mlv2/manual/custom/deployment_template.py
Outdated
Show resolved
Hide resolved
Release SuggestionsModule: machinelearningservices
Notes
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Please fix CI issues |
|
@yonzhan I don't see any CI issues in the PR now. |
Fix az ml deployment-template update crash and list table output
Bug Fixes -
az ml deployment-template update — Fixed KeyError: 'tags' crash when updating a deployment template that has no tags or description. Changed bracket access to.get() for optional fields. SDK doesn't throw error in any immutable entity update scenario, keeping that behaviour same.
az ml deployment-template list — Fixed -o table rendering empty output (no data rows). Added missing table_transformer for the list command.
Files Changed -
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.