Azure ML - Model not registering, encountering WebServiceException

Viewed 151

I've successfully registered a model with the following exact same code snippet before:

#register model
from azureml.core.model import Model

register_model = Model.register(model_path = "./models",
                       model_name = "cr_tools",
                       description = "Tools relating to the Customer Relations classifier.",
                       workspace = ws)

register_model

But now it's not working for a different model (different ./models directory), and I'm encountering the following error:

ServiceException: ServiceException:
    Code: 504
    Message: Operation returned an invalid status code 'Gateway Time-out'
    Details:

    Headers: {
        "Date": "Tue, 04 Jan 2022 22:12:54 GMT",
        "Content-Type": "text/html",
        "Content-Length": "160",
        "Connection": "keep-alive",
        "Strict-Transport-Security": "max-age=15724800; includeSubDomains; preload",
        "X-Content-Type-Options": "nosniff",
        "x-request-time": "60.019"
    }
    InnerException: 504 Server Error: Gateway Time-out for url: https://eastus.experiments.azureml.net/artifact/v2.0/subscriptions/c450f3d1-583c-495f-b5d3-0b38b99e70c0/resourceGroups/ba-p-zeaus-group020-rg/providers/Microsoft.MachineLearningServices/workspaces/p-group020-aml-ws-001/artifacts/batch/metadata/LocalUpload/220104T215629-7c0d42b6
1 Answers

Not able to find exact reason for your error. But generally ServiceException: ServiceException: Code: 504 error occurs when did not receive a timely response from the upstream server specified by the URI.

However, You can refer this github repo for model registration and deployment.

Related