Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix conversion of pathlib.Path to str (iree-org#17573)
This fixes the error shown in [0] that I see when trying to import a big model. [0] ``` Traceback (most recent call last): File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/code/iree/build/compiler/bindings/python/iree/compiler/tools/import_onnx/__main__.py", line 144, in <module> _cli_main() File "/code/iree/build/compiler/bindings/python/iree/compiler/tools/import_onnx/__main__.py", line 140, in _cli_main sys.exit(main(parse_arguments())) File "/code/iree/build/compiler/bindings/python/iree/compiler/tools/import_onnx/__main__.py", line 44, in main model_proto = load_onnx_model(args) File "/code/iree/build/compiler/bindings/python/iree/compiler/tools/import_onnx/__main__.py", line 107, in load_onnx_model onnx.load_external_data_for_model(inferred_model, data_dir) File "/code/iree/.venv/lib/python3.10/site-packages/onnx/external_data_helper.py", line 65, in load_external_data_for_model load_external_data_for_tensor(tensor, base_dir) File "/code/iree/.venv/lib/python3.10/site-packages/onnx/external_data_helper.py", line 43, in load_external_data_for_tensor external_data_file_path = c_checker._resolve_external_data_location( # type: ignore[attr-defined] TypeError: _resolve_external_data_location(): incompatible function arguments. The following argument types are supported: 1. (arg0: str, arg1: str, arg2: str) -> str ```
- Loading branch information