azure-cli
azure-cli copied to clipboard
Expose environment status in the response of `az ml environment show` command
Related command
az ml environment show
The version of az CLI being used:
% az --version
azure-cli 2.38.0
core 2.38.0
telemetry 1.0.6
Extensions:
storage-preview 0.8.3
ml 2.6.1
Dependencies:
msal 1.18.0b1
azure-mgmt-resource 21.1.0b1
Is your feature request related to a problem? Please describe.
We use the az ml environment command to automate the management of environments in AzureML in our CI/CD pipeline.
When creating a new (version of) environment, the command az ml environment create returns immediately when the environment is created (while the environment is being built), we need a way to pull the environment status to make sure that the environment is successfully built before triggering the next step where the newly version of environment is used. But the az ml environment show command does not expose the status in the response.
Describe the solution you'd like
Expose environment status (e.g., Running, Succeeded, Not built, etc.) in the response of az ml environment show command.
Describe alternatives you've considered
N/A
Additional context
N/A
route to CXP team
+1
Adding env status in az ml environment show command would be very useful for a lot of reasons.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @azureml-github.
Issue Details
Related command
az ml environment show
The version of az CLI being used:
% az --version
azure-cli 2.38.0
core 2.38.0
telemetry 1.0.6
Extensions:
storage-preview 0.8.3
ml 2.6.1
Dependencies:
msal 1.18.0b1
azure-mgmt-resource 21.1.0b1
Is your feature request related to a problem? Please describe.
We use the az ml environment command to automate the management of environments in AzureML in our CI/CD pipeline.
When creating a new (version of) environment, the command az ml environment create returns immediately when the environment is created (while the environment is being built), we need a way to pull the environment status to make sure that the environment is successfully built before triggering the next step where the newly version of environment is used. But the az ml environment show command does not expose the status in the response.
Describe the solution you'd like
Expose environment status (e.g., Running, Succeeded, Not built, etc.) in the response of az ml environment show command.
Describe alternatives you've considered
N/A
Additional context
N/A
| Author: | Rainfarm |
|---|---|
| Assignees: | - |
| Labels: |
|
| Milestone: | - |
Hello,
Thanks for the detailed feature request. This is in the roadmap of the right team. Unfortunately, there is no ETA yet, but definitely planned.
Thanks,
Hugo
@hugoaponte
I tried looking for source code of az ml extension but could not find it
In fact , hit upon this question https://github.com/Azure/azure-cli/issues/18108
Any decisions on when it would be open-sourced ?
We are planning to open source the v2 CLI, but we do not yet have a timeline to shaer.
Thank you @hugoaponte! This is an important feature to fully automate the CI/CD pipeline (covering the whole path from environment building to model training). The only work-around I can think of is to rely on a timeout, which is obviously not nice. Or, do you have suggestions on other possible nicer work-arounds?
Thanks again! Looking forward to this feature!
Is there any update on this feature request? As @Rainfarm mentioned this one will enable full automation of CI/CD workflow. Now, if there is any error while environment build, it could be only detected while pipeline execution.
Seems that neither CLI/SDK v2 nor Azure ML REST API do not provide the ability to check build status.
+1 for this feature please - it's not possible to make true CI/CD pipelines without this.
I'm finding az ml v2 commands are a mixed bag with idempotency across the board too - finding where to post them as questions/requests is also very confusing across the board.
Make an issue with the documentation on GitHub, they say go to the Microsoft Q+A site to post it - the Q+A site then say come here to post it.
Hairpulling consistency
https://learn.microsoft.com/en-us/answers/questions/1135983/azure-cli-ml-commands-should-be-idempotent
+1 for this feature for CI/CD pipelines.
Hi,
Yes this is a must to have truly CI CD pipelines.
Hi,
any news about this feature? It is crucial to implement a full CI/CD pipelines flow.
+1 to add this feature to enable CICD pipelines.
Hi @hugoaponte
Is there any ETA for this, you mentioned that it was in the roadmap in 2022.
BR E
any updates here ?
There is no facility to do this even in the Azure ML Python SDK v2 either - so this has been completely missed and needs addressing by someone in some team somewhere.
It used to be in the prior version https://learn.microsoft.com/en-us/python/api/azureml-core/azureml.core.environment.imagebuilddetails?view=azure-ml-py
I question how the AML Studio GUI is able to display the "Environment image build status" field - still using v1 SDK eh??
only way how currently achieve this validation currently is change approach. instead focus on environment, focus on pipeline prepare_image (auto created by aml during env build) and keep on checking status of this job run. Unfortunately even on rest api environment status (e.g., Running, Succeeded, Not built, etc.) does not work and always show as succeeded, but pipeline status works properly.
only way how currently achieve this validation currently is change approach. instead focus on environment, focus on pipeline prepare_image (auto created by aml during env build) and keep on checking status of this job run. Unfortunately even on rest api environment status (e.g., Running, Succeeded, Not built, etc.) does not work and always show as succeeded, but pipeline status works properly.
I don't think this approach works if multiple environment images are being built in the workspace simultaneously. How do you know which job is the correct one to poll? I've resorted to making the pipeline sleep for several minutes.
yes solution works if one env is built at the time that is correct. for many images build on parallel I was not looking for solution but on our use case this solution worked. I am thinking now that potential solution would be to retrieve data from job run json of prepare image run (visible in aml portal so maybe there is rest api or az cli command to get those data) I see data like environment version and other details.