Determine framework automatically before ONNX export (#18615)
* Automatic detection for framework to use when exporting to ONNX * Log message change * Incorporating PR comments, adding unit test * Adding tf for pip install for run_tests_onnxruntime CI * Restoring past changes to circleci yaml and test_onnx_v2.py, tests moved to tests/onnx/test_features.py * Fixup * Adding test to fetcher * Updating circleci config to log more * Changing test class name * Comment typo fix in tests/onnx/test_features.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Moving torch_str/tf_str to self.framework_pt/tf * Remove -rA flag in circleci config Co-authored-by: lewtun <lewis.c.tunstall@gmail.com>
This commit is contained in:
@@ -434,7 +434,7 @@ def module_to_test_file(module_fname):
|
||||
return "tests/utils/test_cli.py"
|
||||
# Special case for onnx submodules
|
||||
elif len(splits) >= 2 and splits[-2] == "onnx":
|
||||
return ["tests/onnx/test_onnx.py", "tests/onnx/test_onnx_v2.py"]
|
||||
return ["tests/onnx/test_features.py", "tests/onnx/test_onnx.py", "tests/onnx/test_onnx_v2.py"]
|
||||
# Special case for utils (not the one in src/transformers, the ones at the root of the repo).
|
||||
elif len(splits) > 0 and splits[0] == "utils":
|
||||
default_test_file = f"tests/utils/test_utils_{module_name}"
|
||||
|
||||
Reference in New Issue
Block a user