Reputation: 3
I am using one of the pre-built pipelines in Azure Machine Learning Studio designer, specifically the 'Wide & Deep based Recommendation - Restaurant Rating Prediction' pipeline. I have successfully run the pipeline to train the model and create an inference pipeline. However, I encountered an error when attempting to deploy the model to the real-time endpoint. The error message I'm receiving is:
ImportError: cannot import name 'url_quote' from 'werkzeug.urls'
This error occurs when deploying to both AKS (AksCompute) and ACI (Azure Container Instances) compute types.
I suspect that downgrading the version of Werkzeug to 2.2.2 may resolve the issue, but I am unsure how to do this in the Azure Machine Learning Studio environment.
How to resolve this error?
Upvotes: 0
Views: 392
Reputation: 8140
You need to create a custom environment to add extra dependencies and packages, and select that environment while deploying the endpoint.
Follow the steps below to create a custom environment:
Go to Environments > Custom environments > Create
Next, give a name to the environment.
I selected the existing environment for the Select environment source option. If you have a Docker context, you can choose that as well.
Next, I selected model-evaluation for the environment type. You can select according to your requirements.
Click on next, and you will see the customization options as shown below.
Here, you will find a conda.yaml
or requirements.txt
file. Click on it and add your package names.
After creating the environment, register the model and start deploying it in a real-time endpoint.
To register, refer to the image below:
To deploy:
While deploying the model, select the created custom environment in the Code + environment tab.
Upvotes: 0