azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

Expose environment status in the response of `az ml environment show` command

Open Rainfarm opened this issue 3 years ago • 19 comments

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

Rainfarm avatar Jul 29 '22 11:07 Rainfarm

route to CXP team

yonzhan avatar Jul 29 '22 11:07 yonzhan

+1

Adding env status in az ml environment show command would be very useful for a lot of reasons.

rajeshnair avatar Jul 29 '22 13:07 rajeshnair

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:

Service Attention, Machine Learning, customer-reported, Auto-Assign

Milestone: -

ghost avatar Aug 01 '22 03:08 ghost

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 avatar Aug 01 '22 19:08 hugoaponte

@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 ?

rajeshnair avatar Aug 01 '22 19:08 rajeshnair

We are planning to open source the v2 CLI, but we do not yet have a timeline to shaer.

paulshealy1 avatar Aug 01 '22 21:08 paulshealy1

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!

Rainfarm avatar Aug 02 '22 07:08 Rainfarm

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.

glebrh avatar Nov 03 '22 17:11 glebrh

+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

neilmca-inc avatar Feb 03 '23 12:02 neilmca-inc

+1 for this feature for CI/CD pipelines.

zargaryanlilit avatar May 10 '23 06:05 zargaryanlilit

Hi,

Yes this is a must to have truly CI CD pipelines.

edgBR avatar Jan 08 '24 12:01 edgBR

Hi,

any news about this feature? It is crucial to implement a full CI/CD pipelines flow.

giorgiococci avatar Jan 31 '24 11:01 giorgiococci

+1 to add this feature to enable CICD pipelines.

Sennevs avatar Feb 21 '24 19:02 Sennevs

Hi @hugoaponte

Is there any ETA for this, you mentioned that it was in the roadmap in 2022.

BR E

edgBR avatar Mar 06 '24 10:03 edgBR

any updates here ?

markusheupel avatar Jul 19 '24 06:07 markusheupel

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??

neilmca-inc avatar Jul 23 '24 14:07 neilmca-inc

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.

komoreka avatar Aug 23 '24 07:08 komoreka

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.

OliverOverend avatar Aug 23 '24 09:08 OliverOverend

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.

komoreka avatar Aug 23 '24 09:08 komoreka