From 7b46b3155891cbf6c783e2535e413b92ae81b050 Mon Sep 17 00:00:00 2001 From: enximi <70036307+enximi@users.noreply.github.com> Date: Sat, 16 Mar 2024 03:41:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20"UserWarning:=20Unsupported=20Windows=20?= =?UTF-8?q?version=20(11).=20ONNX=20Runtime=20sup=E2=80=A6=20(#19845)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: "UserWarning: Unsupported Windows version (11). ONNX Runtime supports Windows 10 and above, only." ### Description Include Windows 11 in the version check. Now, you will not see the warning “Unsupported Windows version (11). ONNX Runtime supports Windows 10 and above, only.” ### Motivation and Context Warning on Windows 11: Only supports systems above Windows 10, which is somewhat strange. --- onnxruntime/python/onnxruntime_validation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/python/onnxruntime_validation.py b/onnxruntime/python/onnxruntime_validation.py index 16cbc8e809..10d9f46986 100644 --- a/onnxruntime/python/onnxruntime_validation.py +++ b/onnxruntime/python/onnxruntime_validation.py @@ -22,7 +22,7 @@ def check_distro_info(): __my_distro__ = __my_system__ __my_distro_ver__ = platform.release().lower() - if __my_distro_ver__ != "10": + if __my_distro_ver__ not in ["10", "11"]: warnings.warn( "Unsupported Windows version (%s). ONNX Runtime supports Windows 10 and above, only." % __my_distro_ver__