Azure / Azure/azureml-examples

Notebook 1c_pipeline_with_hyperparameter_sweep has error ModelAssetPathNotFoundInStorage

Open
#2,050 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Jupyter Notebook
Stars
2k
Forks
1.7k
Avg merge
18h 18m
Merged PRs (30d)
2

Description

### Operating System

Windows

### Version Information

- Using Azure ML notebooks
- Running on an Ubuntu compute instance
- Python Version: `3.10`
- azure-ai-ml Version: `1.1.0` && `1.3.0`
- Conda env: `azureml_py310_sdkv2`

```sh
$ uname -a
Linux 5.15.0-1022-azure #27~20.04.1-Ubuntu SMP Mon Oct 17 02:03:50 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
```

### Steps to reproduce

1. Clone the notebook [1c_pipeline_with_hyperparameter_sweep](https://github.com/Azure/azureml-examples/tree/main/sdk/python/jobs/pipelines/1c_pipeline_with_hyperparameter_sweep) from the samples into my user folder, within Azure ML
2. Execute the notebook
3. Error occurs while job is running

### Expected behavior

The notebook runs to completion.

### Actual behavior

The sweep job failed.

### Addition information

`executionlogs.txt`

```sh
[2023-01-30 22:13:39Z] RunId:[8fede76d-3d06-4fa5-b286-073e1dc28058] ParentRunId:[lemon_parrot_j6zfpdpxb6] ComputeTarget:[AmlCompute]
[2023-01-30 22:13:54Z] Current job status is: Running
[2023-01-30 22:14:12Z] Current job status is: Running
[2023-01-30 22:14:28Z] Current job status is: Running
[2023-01-30 22:14:44Z] Current job status is: Running
[2023-01-30 22:15:00Z] Current job status is: Running
[2023-01-30 22:15:16Z] Current job status is: Running
[2023-01-30 22:15:31Z] Current job status is: Running
[2023-01-30 22:15:46Z] Current job status is: Running
[2023-01-30 22:16:03Z] Current job status is: Running
[2023-01-30 22:16:18Z] Current job status is: Running
[2023-01-30 22:16:34Z] Current job status is: Running
[2023-01-30 22:16:50Z] Current job status is: Running
[2023-01-30 22:17:07Z] Current job status is: Running
[2023-01-30 22:17:23Z] Current job status is: Running
[2023-01-30 22:17:39Z] Current job status is: Running
[2023-01-30 22:17:54Z] Current job status is: Running
[2023-01-30 22:18:09Z] Current job status is: Running
[2023-01-30 22:18:25Z] Current job status is: Running
[2023-01-30 22:18:41Z] Current job status is: Failed
```

---

`stderrorlogs.txt`

```json
[2023-01-30 22:18:41Z] Job failed with Error: {"Error":{"Code":"UserError","Severity":null,"Message":"UserErrorException:\n\tMessage: Model asset creation API failed with {'additional_properties': {'code': 'BadRequest', 'message': 'The request is invalid.', 'details': [{'code': 'ModelAssetPathNotFoundInStorage', 'message': 'No blobs found in storage at model asset path: azureml/HD_8dfb0c23-8bb0-4c4c-a415-de959b70ee86_0/model_output/'}], 'statusCode': 400}, 'error': , 'correlation': {'operation': 'da56651c98c70da0ce4b42282c0bc477', 'request': '0268f28f452bbc33', 'RequestId': '0268f28f452bbc33'}, 'environment': 'australiaeast', 'location': 'australiaeast', 'time': datetime.datetime(2023, 1, 30, 22, 16, 38, 55869, tzinfo=), 'component_name': 'modelregistry'}\n\tInnerException None\n\tErrorResponse \n{\n \"error\": {\n \"code\": \"UserError\",\n \"message\": \"Model asset creation API failed with {'additional_properties': {'code': 'BadRequest', 'message': 'The request is invalid.', 'details': [{'code': 'ModelAssetPathNotFoundInStorage', 'message': 'No blobs found in storage at model asset path: azureml/HD_8dfb0c23-8bb0-4c4c-a415-de959b70ee86_0/model_output/'}], 'statusCode': 400}, 'error': , 'correlation': {'operation': 'da56651c98c70da0ce4b42282c0bc477', 'request': '0268f28f452bbc33', 'RequestId': '0268f28f452bbc33'}, 'environment': 'australiaeast', 'location': 'australiaeast', 'time': datetime.datetime(2023, 1, 30, 22, 16, 38, 55869, tzinfo=), 'component_name': 'modelregistry'}\"\n }\n}","MessageFormat":null,"MessageParameters":{},"ReferenceCode":null,"DetailsUri":null,"Target":null,"Details":[],"InnerError":null,"DebugInfo":null,"AdditionalInfo":null},"Correlation":null,"Environment":null,"Location":null,"Time":"0001-01-01T00:00:00+00:00","ComponentName":null}

```

---

Notebook cell output error

```sh
RunId: musing_garden_tgmlmfyw09
Web View: https://ml.azure.com/runs/musing_garden_tgmlmfyw09?wsid=/subscriptions//resourcegroups//workspaces/

Streaming logs/azureml/executionlogs.txt
========================================

[2023-01-30 22:16:05Z] Submitting 1 runs, first five are: 34465546:c7008848-3bc4-4fe9-82d2-2e524ccdd1d6
[2023-01-30 22:19:06Z] Execution of experiment failed, update experiment status and cancel running nodes.

Execution Summary
=================
RunId: musing_garden_tgmlmfyw09
Web View: https://ml.azure.com/runs/musing_garden_tgmlmfyw09?wsid=/subscriptions//resourcegroups//workspaces/
---------------------------------------------------------------------------
JobException Traceback (most recent call last)
Input In [6], in ()
1 # Wait until the job completes
----> 2 ml_client.jobs.stream(pipeline_job.name)

File /anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/azure/core/tracing/decorator.py:78, in distributed_trace..decorator..wrapper_use_tracer(*args, **kwargs)
76 span_impl_type = settings.tracing_implementation()
77 if span_impl_type is None:
---> 78 return func(*args, **kwargs)
80 # Merge span is parameter is set, but only if no explicit parent are passed
81 if merge_span and not passed_in_parent:

File /anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/azure/ai/ml/_telemetry/activity.py:259, in monitor_with_activity..monitor..wrapper(*args, **kwargs)
256 @functools.wraps(f)
257 def wrapper(*args, **kwargs):
258 with log_activity(logger, activity_name or f.__name__, activity_type, custom_dimensions):
--> 259 return f(*args, **kwargs)

File /anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/azure/ai/ml/operations/_job_operations.py:617, in JobOperations.stream(self, name)
614 if _is_pipeline_child_job(job_object):
615 raise PipelineChildJobError(job_id=job_object.id)
--> 617 self._stream_logs_until_completion(
618 self._runs_operations, job_object, self._datastore_operations, requests_pipeline=self._requests_pipeline
619 )

File /anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/azure/ai/ml/operations/_job_ops_helper.py:297, in stream_logs_until_completion(run_operations, job_resource, datastore_operations, raise_exception_on_failed_job, requests_pipeline)
295 file_handle.write("\n")
296 else:
--> 297 raise JobException(
298 message="Exception : \n {} ".format(json.dumps(error, indent=4)),
299 target=ErrorTarget.JOB,
300 no_personal_data_message="Exception raised on failed job.",
301 error_category=ErrorCategory.SYSTEM_ERROR,
302 )
304 file_handle.write("\n")
305 file_handle.flush()

JobException: Exception :
{
"error": {
"code": "UserError",
"message": "Pipeline has some failed steps. See child run or execution logs for more details.",
"message_format": "Pipeline has some failed steps. {0}",
"message_parameters": {},
"reference_code": "PipelineHasStepJobFailed",
"details": []
},
"environment": "australiaeast",
"location": "australiaeast",
"time": "2023-01-30T22:19:06.529856Z",
"component_name": ""
}
```

---

Other info
- I have also been attempting to run sweep jobs via YAML files and submitting them to an Azure ML compute cluster (not using the notebook)
- The exact same error occurs when attempting to use YAML + source code submitted via the CLI, i.e. `ModelAssetPathNotFoundInStorage`, which would lead me to think this is an issue with the sweep job itself.

Contributor guide

Open the contributing guide

Research direction

Start with sdk/python/jobs/pipelines/1c_pipeline_with_hyperparameter_sweep and reproduce the notebook on the stated Azure ML setup. Inspect the failed child run's executionlogs.txt and stderrorlogs.txt around ModelAssetPathNotFoundInStorage, then compare with the YAML and CLI sweep attempts. Done means the sweep job completes without the model asset storage error.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, jupyter-notebook, python
Domain
cloud, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.