Skip to content

Commit d5f247e

Browse files
authored
Update how-to-inference-server-http.md
added paragraph based on Stanley's feedback. Thanks a lot!
1 parent ca29be8 commit d5f247e

File tree

1 file changed

+34
-3
lines changed

1 file changed

+34
-3
lines changed

articles/machine-learning/how-to-inference-server-http.md

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,41 @@ TypeError: register() takes 3 positional arguments but 4 were given
167167
168168
```
169169
170-
You have **Flask 2** installed in your python environment but are running a server (< 0.7.0) that does not support Flask 2. To resolve, please upgrade to the latest version of server.
170+
You have **Flask 2** installed in your python environment but are running a version of `azureml-inference-server-http`
171+
that does not support Flask 2. Support for Flask 2 is added in `azureml-inference-server-http>=0.7.0`, which is also in `azureml-defaults>=1.44`.
171172
172-
> [!TIP]
173-
> If you have `azureml-inference-server-http==0.7.x` installed but are running a server before `0.7.0`, you are probably on an older version of the training image. Please use a training image after (not including) 20220601. If you can't switch to the new training image, you can also resolve the issue by specifying `azureml-defaults==1.43` or `azureml-inference-server-http~=0.4.13` in your dependencies. You can check the image version by running `docker run <FULL_IMAGE_NAME> cat /IMAGE_INFORMATION`.
173+
1. If you are not using this package in an AzureML docker image, please use the latest version of
174+
`azureml-inference-server-http` or `azureml-defaults`.
175+
176+
2. If you are using this package with an AzureML docker image, please make sure your are using an image built in or after July,
177+
2022. The image version is available in the container logs. You should be able to find a log similar to below:
178+
179+
```
180+
2022-08-22T17:05:02,147738763+00:00 | gunicorn/run | AzureML Container Runtime Information
181+
2022-08-22T17:05:02,161963207+00:00 | gunicorn/run | ###############################################
182+
2022-08-22T17:05:02,168970479+00:00 | gunicorn/run |
183+
2022-08-22T17:05:02,174364834+00:00 | gunicorn/run |
184+
2022-08-22T17:05:02,187280665+00:00 | gunicorn/run | AzureML image information: openmpi4.1.0-ubuntu20.04, Materializaton Build:20220708.v2
185+
2022-08-22T17:05:02,188930082+00:00 | gunicorn/run |
186+
2022-08-22T17:05:02,190557998+00:00 | gunicorn/run |
187+
```
188+
189+
The build date of the image appears after "Materialization Build", which in the above example is `20220708`, or July
190+
8th, 2022. This is an image compatible with Flask 2. If you don't see a banner like this in your container log, your
191+
image is out-of-date and should be updated. If you are using a cuda image, and are unable to find a newer image,
192+
please check if your image is deprecated in [AzureML-Containers](https://github.com/Azure/AzureML-Containers). If it
193+
is, you should be able to find replacements.
194+
195+
If this is an online endpoint, you can also find the logs under "Deployment logs" in the [online endpoint page in
196+
Azure Machine Learning Studio](https://ml.azure.com/endpoints). If you deploy with SDK v1 and do not explicitly
197+
specify an image in your deployment configuration, it will default to using a version of `openmpi4.1.0-ubuntu20.04`
198+
that matches your local SDK toolset, which may not be the latest version of the image. For example, SDK 1.43 will
199+
default to using `openmpi4.1.0-ubuntu20.04:20220616`, which is incompatible. Please make sure you use the latest SDK
200+
for your deployment.
201+
202+
If for some reason you're unable to update the image, you can temporary workaround the issue by pinning
203+
`azureml-defaults==1.43` or `azureml-inference-server-http~=0.4.13`, which will install the older version server with
204+
`Flask 1.0.x`.
174205
175206
### 2. I encountered an ``ImportError`` or ``ModuleNotFoundError`` on modules ``opencensus``, ``jinja2``, ``MarkupSafe``, or ``click`` during startup like the following:
176207

0 commit comments

Comments
 (0)