'Error in init() function during azure ML deployment due to model path definition [closed]

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.

Code:

enter image description here



Solution 1:[1]

  • Have you registered the model in your workspace by using the register() function on the model object.
  • Otherwise, there will be no model path, which may result in failure.
  • Run service.get_logs() to get log information from the unhealthy service to see what is causing it to fail.
  • Please refer to debug-locally for more information.
  • You can debug your scoring file locally for more information. View the diagnostic events to check status of container, it may help you to debug the issue.
  • View the diagnostic events to examine the state of the container; this may assist you in troubleshooting the problem.

Steps to register and deploy the model

- Register the Model
- Define Azure ML Deployment Configuration
- Create Environment Configuration file
- Create Azure ML Scoring file
- Deploy the model to Azure Container Instance
- Expose Web service

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 HarshithaVeeramalla-MT