mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-24 19:43:35 +00:00
Print value errors in ort.InferenceSession to user (#15360)
This commit is contained in:
parent
207c57219a
commit
5294cd0c55
1 changed files with 2 additions and 2 deletions
|
|
@ -367,9 +367,9 @@ class InferenceSession(Session):
|
|||
|
||||
try:
|
||||
self._create_inference_session(providers, provider_options, disabled_optimizers)
|
||||
except ValueError:
|
||||
except ValueError as e:
|
||||
if self._enable_fallback:
|
||||
print(f"EP Error using {providers}")
|
||||
print(f"EP Error {e} when using {providers}")
|
||||
print(f"Falling back to {self._fallback_providers} and retrying.")
|
||||
self._create_inference_session(self._fallback_providers, None)
|
||||
# Fallback only once.
|
||||
|
|
|
|||
Loading…
Reference in a new issue