question

SahanaGurumurthyAccentureInternati-9832 avatar image
0 Votes"
SahanaGurumurthyAccentureInternati-9832 asked ramr-msft answered

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

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
image.png (162.9 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ramr-msft avatar image
0 Votes"
ramr-msft answered

@SahanaGurumurthyAccentureInternati-9832 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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.