diff --git a/python/rapidocr_onnxruntime/utils/infer_engine.py b/python/rapidocr_onnxruntime/utils/infer_engine.py index 13b3e14d4..51ee123a2 100644 --- a/python/rapidocr_onnxruntime/utils/infer_engine.py +++ b/python/rapidocr_onnxruntime/utils/infer_engine.py @@ -96,7 +96,7 @@ def _check_cuda(self) -> bool: 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 @@ def _check_dml(self) -> bool: 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 @@ def _check_dml(self) -> bool: 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],