Container does not exist error when trying to invoke ML Batch Endpoint

Tom Smith 0 Reputation points
2023-05-25T09:48:49.1366667+00:00

So I have a Batch Endpoint deployed in ML studio.

I am able to run a job successfully when manually creating a job for this endpoint from within the portal using a datastore, which is just a mounted container of images in ML studio.

I have been attempting to invoke this endpoint using both the python SDK as well as through the rest API with .NET, however in both scenarios the job fails with the following error.

Failed to download snapshot from storage using SAS url. Error message: The specified container does not exist.
RequestId:563bdada-501e-0078-4ee1-8e27c8000000
Time:2023-05-25T08:21:05.1296437Z, Storage account name: mystorageaccount, Storage error code: ContainerNotFound, Storage path: https://mystorageaccount.blob.core.windows.net/132fbb23-7-a6c501d9-9a17-5ec2-a46a-80dee62dee15/script/__pycache__/score.cpython-37.pyc. Storage container does not exist for storage account name: mystorageaccount, container name: 132fbb23-7-a6c501d9-9a17-5ec2-a46a-80dee62dee14 Tip: Please try to re-upload the snapshot. To do so, edit any content in the local source directory and resubmit the run.

To clarify, the container referenced in the url above is nothing like the url I send.

I am invoking the endpoint as per documentation like this:

job = ml_client.batch_endpoints.invoke(
   endpoint_name=endpoint_name,
   input= Input(type=AssetTypes.URI_Folder, path='https://mystorageaccount.blob.core.windows.net/test-batch-images')
)

The container does exist, and I have tried this on multiple containers with the same error. I have also tried setting the public access level to both blob as well as container and still receive the same error.

I have ensured I have followed the authentication principles lined out here:

https://learn.microsoft.com/en-us/azure/machine-learning/how-to-access-data-batch-endpoints-jobs?view=azureml-api-2&tabs=cli under 'Security considerations when reading data', where my compute cluster has a managed Identity associated with it that has the correct access to the storage account.

I have also tried generating an sas url for the container and passing that as an argument, but this returns an error when invoking saying 'URL contains secrets, must store secrets in datastore.'

There's nothing in the documentation about invoking an endpoint with a secret for the attached data. I would have assumed this was managed behind the scenes given that you have to add a managed identity to the compute cluster to access containers.

AM I missing something? is there a way to separately authenticate the created docker container running the batch?

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
2,579 questions
Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,721 questions
{count} votes