You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/machine-learning/includes/machine-learning-inference-server-troubleshooting.md
+34-44Lines changed: 34 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,41 +2,36 @@
2
2
author: shohei1029
3
3
ms.service: azure-machine-learning
4
4
ms.topic: include
5
-
ms.date: 08/07/2024
5
+
ms.date: 09/17/2024
6
6
ms.author: shnagata
7
7
---
8
8
9
+
<aname="frequently-asked-questions"></a>
9
10
### Check installed packages
10
11
11
-
Follow these steps to address issues with installed packages:
12
+
Follow these steps to address issues with installed packages.
12
13
13
14
1. Gather information about installed packages and versions for your Python environment.
14
15
15
-
1. Confirm the `azureml-inference-server-http` Python package version specified in the environment file matches the Azure Machine Learning inference HTTP server version displayed in the [startup log](../how-to-inference-server-http.md#view-startup-logs).
16
+
1. Confirm that the `azureml-inference-server-http` Python package version specified in the environment file matches the Azure Machine Learning inference HTTP server version displayed in the [startup log](../how-to-inference-server-http.md#view-startup-logs).
16
17
17
-
- In some cases, the pip dependency resolver installs unexpected package versions.
18
-
19
-
- You might need to run `pip` to correct installed packages and versions.
18
+
In some cases, the pip dependency resolver installs unexpected package versions. You might need to run `pip` to correct installed packages and versions.
20
19
21
20
1. If you specify the Flask or its dependencies in your environment, remove these items.
22
21
23
22
- Dependent packages include `flask`, `jinja2`, `itsdangerous`, `werkzeug`, `markupsafe`, and `click`.
24
-
25
23
-`flask` is listed as a dependency in the server package. The best approach is to allow the inference server to install the `flask` package.
26
-
27
24
- When the inference server is configured to support new versions of Flask, the server automatically receives the package updates as they become available.
28
25
29
26
### Check server version
30
27
31
-
The `azureml-inference-server-http` server package is published to PyPI. The changelog and all previous versions are listed on the [PyPI page](https://pypi.org/project/azureml-inference-server-http/).
32
-
33
-
If you use an earlier package version, the recommendation is to update your configuration to the **latest** version.
28
+
The `azureml-inference-server-http` server package is published to PyPI. The [PyPI page](https://pypi.org/project/azureml-inference-server-http/) lists the changelog and all previous versions.
34
29
35
-
The following table summarizes stable versions, common issues, and recommended adjustments:
30
+
If you're using an earlier package version, update your configuration to the latest version. The following table summarizes stable versions, common issues, and recommended adjustments:
36
31
37
32
| Package version | Description | Issue | Resolution |
38
33
| --- | --- | --- |
39
-
|**0.4.x**| Bundled in training images dated `20220601` or earlier and `azureml-defaults` package versions `.1.34` through `1.43`. Latest stable version is **0.4.13**. | For server versions earlier than **0.4.11**, you might encounter Flask dependency issues, such as "can't import name Markup from jinja2."| Upgrade to version **0.4.13** or **0.8.x** (the latest version), if possible. |
34
+
|**0.4.x**| Bundled in training images dated `20220601` or earlier and `azureml-defaults` package versions `.1.34` through `1.43`. Latest stable version is **0.4.13**. | For server versions earlier than **0.4.11**, you might encounter Flask dependency issues, such as `"can't import name Markup from jinja2"`.| Upgrade to version **0.4.13** or **0.8.x**, the latest version, if possible. |
40
35
|**0.6.x**| Preinstalled in inferencing images dated `20220516` and earlier. Latest stable version is **0.6.1**. | N/A | N/A |
41
36
|**0.7.x**| Supports Flask 2. Latest stable version is **0.7.7**. | N/A | N/A |
42
37
|**0.8.x**| Log format changed. Python 3.6 support ended. | N/A | N/A |
@@ -45,24 +40,20 @@ The following table summarizes stable versions, common issues, and recommended a
45
40
46
41
### Check package dependencies
47
42
48
-
The most relevant dependent packages for the `azureml-inference-server-http` server package include:
43
+
The most relevant dependent packages for the `azureml-inference-server-http` server package include:
49
44
50
45
-`flask`
51
46
-`opencensus-ext-azure`
52
47
-`inference-schema`
53
48
54
-
If you specified the `azureml-defaults` package in your Python environment, the `azureml-inference-server-http` package is a dependendent package. The dependency is installed automatically.
49
+
If you specified the `azureml-defaults` package in your Python environment, the `azureml-inference-server-http` package is a dependent package. The dependency is installed automatically.
55
50
56
51
> [!TIP]
57
52
> If you use Python SDK v1 and don't explicitly specify the `azureml-defaults` package in your Python environment, the SDK might automatically add the package. However, the packager version is locked relative to the SDK version. For example, if the SDK version is `1.38.0`, then the `azureml-defaults==1.38.0` entry is added to the environment's pip requirements.
58
53
59
-
### Frequently asked questions
54
+
### TypeError during server startup
60
55
61
-
The following sections describe possible resolutions for frequently asked questions about the Azure Machine Learning inference HTTP server.
62
-
63
-
#### TypeError during server startup
64
-
65
-
You might encounter a TypeError during server startup, as follows:
56
+
You might encounter the following `TypeError` during server startup:
66
57
67
58
```bash
68
59
TypeError: register() takes 3 positional arguments but 4 were given
@@ -76,40 +67,39 @@ TypeError: register() takes 3 positional arguments but 4 were given
76
67
77
68
This error occurs when you have Flask 2 installed in your Python environment, but your `azureml-inference-server-http` package version doesn't support Flask 2. Support for Flask 2 is available in `azureml-inference-server-http` package version **0.7.0** and later, and `azureml-defaults` package version **1.44** and later.
78
69
79
-
- If you don't use the Flask 2 package in an Azure Machine Learning docker image, use the latest version of the `azureml-inference-server-http` or `azureml-defaults` package
70
+
- If you don't use the Flask 2 package in an Azure Machine Learning Docker image, use the latest version of the `azureml-inference-server-http` or `azureml-defaults` package.
71
+
- If you use the Flask 2 package in an Azure Machine Learning Docker image, confirm that the image build version is **July 2022** or later.
80
72
81
-
- If you use the Flask 2 package in an Azure Machine Learning docker image, confirm the image build version is **July 2022** or later.
73
+
You can find the image version in the container logs. For example:
82
74
83
-
You can find the image version in the container logs:
75
+
```console
76
+
2022-08-22T17:05:02,147738763+00:00 | gunicorn/run | AzureML Container Runtime Information
The build date of the image appears after the `Materialization Build` notation. In the preceding example, the image version is `20220708` or July 8, 2022. The image in this example is compatible with Flask 2.
94
86
95
-
- The build date of the image appears after the `Materialization Build` notation. In the example, the image version is `20220708` or July 8, 2022. In this example, the image is compatible with Flask 2.
96
-
97
-
- If you don't see a similar message in your container log, your image is out-of-date and should be updated. If you use a Compute Unified Device Architecture (CUDA) image, and you can't find a newer image, check if your image is deprecated in [AzureML-Containers](https://github.com/Azure/AzureML-Containers). You can find designated replacements for deprecated images.
87
+
If you don't see a similar message in your container log, your image is out-of-date and should be updated. If you use a Compute Unified Device Architecture (CUDA) image, and you can't find a newer image, check if your image is deprecated in [AzureML-Containers](https://github.com/Azure/AzureML-Containers). You can find designated replacements for deprecated images.
98
88
99
-
-If you use the server with an online endpoint, you can also find the logs under "Deployment logs" in the [online endpoint page in Azure Machine Learning studio](https://ml.azure.com/endpoints).
89
+
If you use the server with an online endpoint, you can also find the logs in the **Logs** on the **Endpoints**page in Azure Machine Learning studio.
100
90
101
-
-If you deploy with SDK v1, and don't explicitly specify an image in your deployment configuration, the server applies the `openmpi4.1.0-ubuntu20.04` package with a version that matches your local SDK toolset. However, the version installed might not be the latest available version of the image. For SDK version 1.43, the server installs the `openmpi4.1.0-ubuntu20.04:20220616` package version by default, but this package version isn't compatible with SDK 1.43. Make sure you use the latest SDK for your deployment.
91
+
If you deploy with SDK v1, and don't explicitly specify an image in your deployment configuration, the server applies the `openmpi4.1.0-ubuntu20.04` package with a version that matches your local SDK toolset. However, the version installed might not be the latest available version of the image.
102
92
103
-
- If you can't update the image, you can temporarily avoid the issue by pinning the `azureml-defaults==1.43` or `azureml-inference-server-http~=0.4.13` entries in your environment file. These entries direct the server to install the older version with `flask 1.0.x`.
93
+
For SDK version 1.43, the server installs the `openmpi4.1.0-ubuntu20.04:20220616` package version by default, but this package version isn't compatible with SDK 1.43. Make sure you use the latest SDK for your deployment.
104
94
105
-
#### ImportError or ModuleNotFoundError during server startup
95
+
If you can't update the image, you can temporarily avoid the issue by pinning the `azureml-defaults==1.43`or `azureml-inference-server-http~=0.4.13` entries in your environment file. These entries direct the server to install the older version with `flask 1.0.x`.
106
96
107
-
You might encounter an `ImportError` or `ModuleNotFoundError` on specific modules during server startup, such as `opencensus`, `jinja2`, `markupsafe`, or `click`. Here's an example of the error message:
97
+
### ImportError or ModuleNotFoundError during server startup
98
+
99
+
You might encounter an `ImportError` or `ModuleNotFoundError` on specific modules, such as `opencensus`, `jinja2`, `markupsafe`, or `click`, during server startup. The following example shows the error message:
108
100
109
101
```bash
110
102
ImportError: cannot import name 'Markup' from 'jinja2'
111
103
```
112
104
113
-
The import and module errors occur when you use older versions of the server (version **0.4.10** and earlier) that don't pin the Flask dependency to a compatible version.
114
-
115
-
To prevent the issue, install a later version of the server.
105
+
The import and module errors occur when you use version **0.4.10** or earlier versions of the server that don't pin the Flask dependency to a compatible version. To prevent the issue, install a later version of the server.
0 commit comments