Skip to content

Commit

Permalink
Merge branch 'Cjian/pytest' into Cjian/pydml
Browse files Browse the repository at this point in the history
  • Loading branch information
jchen351 committed Oct 26, 2024
2 parents 7a2cd9c + ff73270 commit 4c29c54
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions onnxruntime/test/python/onnx_backend_test_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def load_jsonc(basename: str):
return json.loads("\n".join(lines))


def create_backend_test(devices:list[str] = None, test_name=None):
def create_backend_test(devices: list[str] = None, test_name=None):
"""Creates an OrtBackendTest and adds its TestCase's to global scope so unittest will find them."""

overrides = load_jsonc("onnx_backend_test_series_overrides.jsonc")
Expand Down Expand Up @@ -198,10 +198,10 @@ def parse_args():
parser.add_argument(
"--devices",
type=str,
choices=["CPU", "CUDA", "MIGRAPHX", "DNNL", "DML", "OPENVINO_GPU", "OPENVINO_CPU", "OPENVINO_NPU","OPENVINO"],
choices=["CPU", "CUDA", "MIGRAPHX", "DNNL", "DML", "OPENVINO_GPU", "OPENVINO_CPU", "OPENVINO_NPU", "OPENVINO"],
nargs="+", # allows multiple values
default=["CPU"], # default to ["CPU"] if no input is given
help="Select one or more devices CPU, CUDA, MIGRAPHX, DNNL, DML, OPENVINO_GPU, OPENVINO_CPU, OPENVINO_NPU, OPENVINO"
help="Select one or more devices CPU, CUDA, MIGRAPHX, DNNL, DML, OPENVINO_GPU, OPENVINO_CPU, OPENVINO_NPU, OPENVINO",
)

# parse just our args. python unittest has its own args and arg parsing, and that runs inside unittest.main()
Expand All @@ -214,5 +214,5 @@ def parse_args():
if __name__ == "__main__":
args = parse_args()

create_backend_test(args.devices,args.test_name)
unittest.main()
create_backend_test(args.devices, args.test_name)
unittest.main()

0 comments on commit 4c29c54

Please sign in to comment.