Skip to content

Commit d5adb96

Browse files
author
Jill Grant
authored
Merge pull request #300 from v-thepet/endpoints
Freshness 1 - 180 days freshness updates
2 parents 3bafd34 + fc2c3e2 commit d5adb96

File tree

6 files changed

+737
-807
lines changed

6 files changed

+737
-807
lines changed

articles/machine-learning/concept-endpoints-online.md

Lines changed: 166 additions & 154 deletions
Large diffs are not rendered by default.

articles/machine-learning/how-to-troubleshoot-online-endpoints.md

Lines changed: 439 additions & 515 deletions
Large diffs are not rendered by default.

articles/machine-learning/includes/machine-learning-inference-server-troubleshooting.md

Lines changed: 34 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,36 @@
22
author: shohei1029
33
ms.service: azure-machine-learning
44
ms.topic: include
5-
ms.date: 08/07/2024
5+
ms.date: 09/17/2024
66
ms.author: shnagata
77
---
88

9+
<a name="frequently-asked-questions"></a>
910
### Check installed packages
1011

11-
Follow these steps to address issues with installed packages:
12+
Follow these steps to address issues with installed packages.
1213

1314
1. Gather information about installed packages and versions for your Python environment.
1415

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).
1617

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.
2019

2120
1. If you specify the Flask or its dependencies in your environment, remove these items.
2221

2322
- Dependent packages include `flask`, `jinja2`, `itsdangerous`, `werkzeug`, `markupsafe`, and `click`.
24-
2523
- `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-
2724
- When the inference server is configured to support new versions of Flask, the server automatically receives the package updates as they become available.
2825

2926
### Check server version
3027

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.
3429

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:
3631

3732
| Package version | Description | Issue | Resolution |
3833
| --- | --- | --- |
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. |
4035
| **0.6.x** | Preinstalled in inferencing images dated `20220516` and earlier. Latest stable version is **0.6.1**. | N/A | N/A |
4136
| **0.7.x** | Supports Flask 2. Latest stable version is **0.7.7**. | N/A | N/A |
4237
| **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
4540

4641
### Check package dependencies
4742

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:
4944

5045
- `flask`
5146
- `opencensus-ext-azure`
5247
- `inference-schema`
5348

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.
5550

5651
> [!TIP]
5752
> 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.
5853
59-
### Frequently asked questions
54+
### TypeError during server startup
6055

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:
6657

6758
```bash
6859
TypeError: register() takes 3 positional arguments but 4 were given
@@ -76,40 +67,39 @@ TypeError: register() takes 3 positional arguments but 4 were given
7667

7768
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.
7869

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.
8072

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:
8274

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
77+
2022-08-22T17:05:02,161963207+00:00 | gunicorn/run | ###############################################
78+
2022-08-22T17:05:02,168970479+00:00 | gunicorn/run |
79+
2022-08-22T17:05:02,174364834+00:00 | gunicorn/run |
80+
2022-08-22T17:05:02,187280665+00:00 | gunicorn/run | AzureML image information: openmpi4.1.0-ubuntu20.04, Materialization Build:20220708.v2
81+
2022-08-22T17:05:02,188930082+00:00 | gunicorn/run |
82+
2022-08-22T17:05:02,190557998+00:00 | gunicorn/run |
83+
```
8484

85-
```console
86-
2022-08-22T17:05:02,147738763+00:00 | gunicorn/run | AzureML Container Runtime Information
87-
2022-08-22T17:05:02,161963207+00:00 | gunicorn/run | ###############################################
88-
2022-08-22T17:05:02,168970479+00:00 | gunicorn/run |
89-
2022-08-22T17:05:02,174364834+00:00 | gunicorn/run |
90-
2022-08-22T17:05:02,187280665+00:00 | gunicorn/run | AzureML image information: openmpi4.1.0-ubuntu20.04, Materialization Build:20220708.v2
91-
2022-08-22T17:05:02,188930082+00:00 | gunicorn/run |
92-
2022-08-22T17:05:02,190557998+00:00 | gunicorn/run |
93-
```
85+
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.
9486

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.
9888

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.
10090

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.
10292

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.
10494

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`.
10696

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:
108100

109101
```bash
110102
ImportError: cannot import name 'Markup' from 'jinja2'
111103
```
112104

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

Comments
 (0)