mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-19 21:32:23 +00:00
Description: Format all python files under onnxruntime with black and isort. After checking in, we can use .git-blame-ignore-revs to ignore the formatting PR in git blame. #11315, #11316
15 lines
429 B
Python
15 lines
429 B
Python
import os
|
|
|
|
|
|
def get_name(name):
|
|
if os.path.exists(name):
|
|
return name
|
|
rel = os.path.join("testdata", name)
|
|
if os.path.exists(rel):
|
|
return rel
|
|
this = os.path.dirname(__file__)
|
|
data = os.path.join(this, "..", "testdata")
|
|
res = os.path.join(data, name)
|
|
if os.path.exists(res):
|
|
return res
|
|
raise FileNotFoundError("Unable to find '{0}' or '{1}' or '{2}'".format(name, rel, res))
|