question

TobyTan-0337 avatar image
0 Votes"
TobyTan-0337 asked ramr-msft edited

Azure-cli-ml Version: '1.33.0', 'Error': WebserviceException. Can't deploy model into ACI

Hi, I am trying to deploy with Azure DevOps my ktrain model, which is in a folder and has to loaded as a folder, to ACI, but I got this error:

021-09-26T16:10:35.2295468Z ERROR: {'Azure-cli-ml Version': '1.33.0', 'Error': WebserviceException:
2021-09-26T16:10:35.2296197Z Message: Received bad response from Resource Provider:
2021-09-26T16:10:35.2296590Z Response Code: 404
2021-09-26T16:10:35.2298648Z Headers: {'Date': 'Sun, 26 Sep 2021 16:10:35 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Vary': 'Accept-Encoding', 'x-ms-client-request-id': '656a1432-d67d-4ad7-859d-f1408af3192f', 'x-ms-client-session-id': '3df8af72-17d1-46a7-88ea-21c9adce345f', 'api-supported-versions': '1.0, 2018-03-01-preview, 2018-11-19', 'Strict-Transport-Security': 'max-age=15724800; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'x-request-time': '0.037', 'Content-Encoding': 'gzip'}
2021-09-26T16:10:35.2301435Z Content: b'{"code":"NotFound","statusCode":404,"message":"The specified resource was not found.","details":[{"code":"OperationNotFound","message":"There is no operation with id 7c10e5b9-2c13-48d4-82d0-10feba0ef679"}],"correlation":{"RequestId":"656a1432-d67d-4ad7-859d-f1408af3192f"}}'
2021-09-26T16:10:35.2302322Z InnerException None
2021-09-26T16:10:35.2302601Z ErrorResponse
2021-09-26T16:10:35.2302853Z {
2021-09-26T16:10:35.2303108Z "error": {
2021-09-26T16:10:35.2306300Z "message": "Received bad response from Resource Provider:\nResponse Code: 404\nHeaders: {'Date': 'Sun, 26 Sep 2021 16:10:35 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Vary': 'Accept-Encoding', 'x-ms-client-request-id': '656a1432-d67d-4ad7-859d-f1408af3192f', 'x-ms-client-session-id': '3df8af72-17d1-46a7-88ea-21c9adce345f', 'api-supported-versions': '1.0, 2018-03-01-preview, 2018-11-19', 'Strict-Transport-Security': 'max-age=15724800; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'x-request-time': '0.037', 'Content-Encoding': 'gzip'}\nContent: b'{"code":"NotFound","statusCode":404,"message":"The specified resource was not found.","details":[{"code":"OperationNotFound","message":"There is no operation with id 7c10e5b9-2c13-48d4-82d0-10feba0ef679"}],"correlation":{"RequestId":"656a1432-d67d-4ad7-859d-f1408af3192f"}}'"
2021-09-26T16:10:35.2308796Z }
2021-09-26T16:10:35.2309029Z }}`

My scoring script is below for init(). I have tried using both get_model_path and AZUREML_MODEL_DIR, but they don't work. For the latter, the deployment will keep running, and sometimes for the former.

 def init():
     global model
     logging.basicConfig(level=logging.DEBUG)
     #  load the model from file into a global object
     model_path = Model.get_model_path('mgsa')#, _workspace=ws)
     print(model_path)
     #model_path = os.path.join(os.getenv('AZUREML_MODEL_DIR'), 'outputs')
     model = ktrain.load_predictor(model_path)`
azure-machine-learning
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 ramr-msft edited

@TobyTan-0337 Thanks for the question. Can you confirm are you able to execute successfully in local environment. Please share the sample that you are trying.
Troubleshooting with a local model deployment: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-troubleshoot-deployment-local

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.