From 7528fa96607db440128fed1ce97d9acce63c9a34 Mon Sep 17 00:00:00 2001 From: SWHL Date: Sat, 18 May 2024 15:27:13 +0800 Subject: [PATCH] chore(rapidocr_onnxruntime): Optim tips of infer_engine --- python/rapidocr_onnxruntime/utils/infer_engine.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/python/rapidocr_onnxruntime/utils/infer_engine.py b/python/rapidocr_onnxruntime/utils/infer_engine.py index 13b3e14..51ee123 100644 --- a/python/rapidocr_onnxruntime/utils/infer_engine.py +++ b/python/rapidocr_onnxruntime/utils/infer_engine.py @@ -96,7 +96,7 @@ class OrtInferSession: return True self.logger.warning( - "%s is not in available providers (%s), default use of %s inference.", + "%s is not in available providers (%s). Use %s inference by default.", CUDA_EP, self.had_providers, self.had_providers[0], @@ -127,15 +127,18 @@ class OrtInferSession: cur_os = platform.system() if cur_os != "Windows": self.logger.warning( - "DirectML is only supported in Windows OS. The current OS is %s", cur_os + "DirectML is only supported in Windows OS. The current OS is %s. Use %s inference by default.", + cur_os, + self.had_providers[0], ) return False cur_window_version = int(platform.release().split(".")[0]) if cur_window_version < 10: self.logger.warning( - "DirectML is only supported in Windows 10 and above OS. The current Windows version is %s", + "DirectML is only supported in Windows 10 and above OS. The current Windows version is %s. Use %s inference by default.", cur_window_version, + self.had_providers[0], ) return False @@ -143,7 +146,7 @@ class OrtInferSession: return True self.logger.warning( - "%s is not in available providers (%s), default use of %s inference.", + "%s is not in available providers (%s). Use %s inference by default.", DIRECTML_EP, self.had_providers, self.had_providers[0],