Skip to content

endpoints/online/managed: how to deploy with multiple models / subfolders #1328

Open
@joaocc

Description

@joaocc

Which example? Describe the issue

We are trying to test migration from SDKv1 deployment to v2.

In the SDKv1 scenario we would use the SDK to download models to a local azureml-models, which would then be included in the model definition. Ex below:

./local/azureml-models
    /model-name-1
        /1
            some-somenet.onnx
        /2
            somenet.onnx
    /model-another-b
        /3
            another.onnx

This folder structure is the one created by azureml sdk when downloading models in preparation for a deployment.

$schema: https://azuremlschemas.azureedge.net/latest/managedOnlineDeployment.schema.json
name: blue
endpoint_name:  ep-name
model:
  path: ../../azureml-models
...

When trying to reproduce this with online endpoints, using for instance, cli/endpoints/online/managed, we receive the following message:
Directory /.../.../azureml-models is empty. path or local_path must be a non-empty directory.

Going through the documentation here https://docs.microsoft.com/en-us/azure/machine-learning/how-to-deploy-managed-online-endpoints#use-more-than-one-model there is a mention to creating a model explicitly pointing to a folder with multiple models.

However, it seems that az ml model create -f model-bundle.yml produces a similar error

$schema: https://azuremlschemas.azureedge.net/latest/model.schema.json
name: model-bundle-1
path: ../../azureml-models
$ az ml model create -f model-bundle.yml --resource-group my_rg --subscription my_sub --workspace-name my_ws
Directory /.../.../azureml-models is empty. path or local_path must be a non-empty directory.

Any idea how CLIv2 can be used to address this scenario?
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions