onnxruntime/onnxruntime/python
kunal-vaishnavi b7176f9826
Fix bug with saving model optimized by inference session (#16716)
### Description
A [previous PR](https://github.com/microsoft/onnxruntime/pull/16531)
added a temporary directory to save the model optimizations after
loading a model into an `InferenceSession`. Many models that have an
external data file, however, require the data file to be in the same
directory as the ONNX model file. Because the model is saved in a
temporary directory and the data is saved in another directory, this
causes a `FileNotFoundError` error when trying to load the model in the
temporary directory.

This PR fixes this error by saving the external data file in the same
directory that the optimized model is located in.

### Motivation and Context
This PR fixes a bug with using a temporary directory while running the
optimizer for models that have an external data file.
2023-07-20 18:44:28 -07:00
..
backend Adopt linrtunner as the linting tool - take 2 (#15085) 2023-03-24 15:29:03 -07:00
datasets Adopt linrtunner as the linting tool - take 2 (#15085) 2023-03-24 15:29:03 -07:00
providers/tvm Bump ruff in CI (#15533) 2023-04-17 10:11:44 -07:00
tools Fix bug with saving model optimized by inference session (#16716) 2023-07-20 18:44:28 -07:00
torch_cpp_extensions Adopt linrtunner as the linting tool - take 2 (#15085) 2023-03-24 15:29:03 -07:00
training
__init__.py
_ld_preload.py
_pybind_state.py.in
exported_symbols.lst
numpy_helper.h
onnxruntime_collect_build_info.py Adopt linrtunner as the linting tool - take 2 (#15085) 2023-03-24 15:29:03 -07:00
onnxruntime_inference_collection.py Fix type annotation for InferenceSession (#16632) 2023-07-11 06:34:22 -07:00
onnxruntime_pybind.h
onnxruntime_pybind_exceptions.cc Run clang-format in CI (#15524) 2023-04-18 09:26:58 -07:00
onnxruntime_pybind_exceptions.h
onnxruntime_pybind_iobinding.cc Run clang-format in CI (#15524) 2023-04-18 09:26:58 -07:00
onnxruntime_pybind_mlvalue.cc [CANN] Add IOBinding Support For CANN EP (#15802) 2023-06-01 03:13:38 -07:00
onnxruntime_pybind_mlvalue.h remove AllocatorMgr class (#16509) 2023-06-28 15:43:19 -07:00
onnxruntime_pybind_module.cc Expose build information in dynamic lib (#15643) 2023-04-28 21:57:31 -07:00
onnxruntime_pybind_ortvalue.cc [CANN] Add IOBinding Support For CANN EP (#15802) 2023-06-01 03:13:38 -07:00
onnxruntime_pybind_schema.cc Fix issues on Windows for Vitis AI (#15810) 2023-05-04 14:42:19 -07:00
onnxruntime_pybind_sparse_tensor.cc Multi-stream execution support (#13495) 2022-12-15 07:39:29 -08:00
onnxruntime_pybind_state.cc Enable -Wshorten-64-to-32 warning if available. (#16524) 2023-07-07 08:11:44 -07:00
onnxruntime_pybind_state.h
onnxruntime_pybind_state_common.cc Allow CUDA EP enable or disable TunableOp via session options and environment variable (#13601) 2022-11-15 14:43:54 +08:00
onnxruntime_pybind_state_common.h Remove onnxruntime_PYBIND_EXPORT_OPSCHEMA definition from onnxruntime (#15776) 2023-05-03 13:08:35 -07:00
onnxruntime_validation.py Adopt linrtunner as the linting tool - take 2 (#15085) 2023-03-24 15:29:03 -07:00
pybind.def
version_script.lds
version_script_expose_onnx_protobuf.lds