Share via

Error in init() function during azurel ML deployment due to model path definition

2022-04-21T05:00:47.76+00:00

Hello Team,

We are trying to deploy a model to Azure ML workspace containing a saved model & One Hot Encoded joblib file.
We are facing issue in init() function.

Please find the below error message:

"message": "Aci Deployment failed with exception: Your container application crashed. This may be caused by errors in your scoring file's init() function.

PFB screenshot of scoring file:

194860-image.png

Azure Machine Learning

1 answer

Sort by: Most helpful
  1. Ramr-msft 17,836 Reputation points
    2022-04-29T15:27:10.893+00:00

    @Sahana Gurumurthy (Accenture International Limite) Thanks, I think the problem is that you rely on AML background process to automatically upload content under ./outputs to AML workspace.
    But when the upload is not complete and we immediately call run.register_model which takes the content from AML workspace then the error will happen.
    To avoid that situation, you can do it like this:

    • Persist model (joblib.dump) to a custom folder other than outputs
    • Manually run upload_file to upload the model AML workspace. Name the destination same name with your model file.
    • Then run run.register_model.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.