Add `ort_nightly_directml` to the `onnxruntime` candidates (#1458)

* Add `ort_nightly_directml` to the `onnxruntime` candidates

* style
This commit is contained in:
Anton Lozhkov 2022-11-29 14:00:41 +01:00 committed by GitHub
parent db7b7bd983
commit 0b7225e918
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -157,7 +157,13 @@ except importlib_metadata.PackageNotFoundError:
_onnxruntime_version = "N/A"
_onnx_available = importlib.util.find_spec("onnxruntime") is not None
if _onnx_available:
candidates = ("onnxruntime", "onnxruntime-gpu", "onnxruntime-directml", "onnxruntime-openvino")
candidates = (
"onnxruntime",
"onnxruntime-gpu",
"onnxruntime-directml",
"onnxruntime-openvino",
"ort_nightly_directml",
)
_onnxruntime_version = None
# For the metadata, we have to look for both onnxruntime and onnxruntime-gpu
for pkg in candidates: