Azure/aml-deploy

Could not load model with provided details

kawofong opened this issue · 5 comments

Hi,

I am encountering the below error when I am trying to deploy a model in ACI.

Traceback (most recent call last):
  File "/code/main.py", line 318, in <module>
    main()
  File "/code/main.py", line 129, in main
    raise AMLConfigurationException(f"Could not load model with provided details: ***exception***")
utils.AMLConfigurationException: Could not load model with provided details: WebserviceException:
	Message: ModelNotFound: Model with name porto_seguro_safe_driver_model, version 14 not found in provided workspace
	InnerException None
	ErrorResponse 
***
    "error": ***
        "message": "ModelNotFound: Model with name porto_seguro_safe_driver_model, version 14 not found in provided workspace"
    ***
***

Here is my GitHub Action yaml.

      - name: Deploy Model to ACI
        id: deploy_aci
        uses: Azure/aml-deploy@v1
        with:
          azure_credentials: ${{ secrets.AZURE_CREDENTIALS }}
          model_name:  "${{ env.MODEL_NAME }}"
          model_version: "${{ env.MODEL_VERSION }}"
          parameters_file: "deploy_aci.json"

I verified that I have these models in my AML.

ka@Azure:~$ az ml model list -o table
Name                            Version    Framework    CreatedTime
------------------------------  ---------  -----------  -------------------
porto_seguro_safe_driver_model  14         Custom       2020-11-20T15:16:19
porto_seguro_safe_driver_model  13         Custom       2020-11-19T17:25:36
porto_seguro_safe_driver_model  12         Custom       2020-11-19T16:39:02
porto_seguro_safe_driver_model  11         Custom       2020-11-19T16:15:37
porto_seguro_safe_driver_model  10         Custom       2020-09-18T17:25:55
porto_seguro_safe_driver_model  9          Custom       2020-09-04T15:55:04
porto_seguro_safe_driver_model  8          Custom       2020-09-03T22:40:08
porto_seguro_safe_driver_model  7          Custom       2020-09-03T21:47:30
porto_seguro_safe_driver_model  6          Custom       2020-09-03T16:11:49
porto_seguro_safe_driver_model  5          Custom       2020-09-03T14:08:11
porto_seguro_safe_driver_model  4          Custom       2020-08-28T21:22:35
porto_seguro_safe_driver_model  3          Custom       2020-08-28T20:38:17
driver_model.pkl                2          Custom       2020-08-28T20:17:31
porto_seguro_safe_driver_model  2          Custom       2020-08-25T02:49:24
porto_seguro_safe_driver_model  1          Custom       2020-08-25T02:21:00
driver_model.pkl                1          Custom       2020-08-19T18:04:23

Any suggestion on how I should go about this error?

Hi @kawo123,
Sorry for my late reply.
Are you connected to the same workspace?
I assume you have used aml-workspace to login to the same workspace before running this action?

@kawo123 I just tested the setup you are describing and it works fine for any model that is registered in the model registry.
Can you please make sure, that you

  1. Are connected to the same workspace and
  2. Make sure that the deploy GH Action runs after the model has been registered in the model registry in your workspace?

An example of my test deployment workflow can be found here: https://github.com/marvinbuss/mlops/actions/runs/377185347/workflow

Another example with env variables can be found here:
https://github.com/marvinbuss/mlops/actions/runs/377244984/workflow

Hi @kawo123,

According to this issue report, it is a bug in azureml sdk v1.17: machine-learning-apps/ml-template-azure#13

I will update to the latest SDK version later today. Can you please test the Action again, once I have created a new release?

Hi @kawo123,
I just released a new version. Please switch back to v1 tag, whenever you are ready. The latest release makes use of the latest azureml-sdk 1.18.0.
Can you please comment whether this fixes the issue you are reporting?

I haven't received any answers from you since you have opened the issue. I will close the issue for now. Please let me know, if I should reopen the issue.