onnxruntime
ee9d0461 - Fix model serialization with external data in current directory (#17311)

Commit
2 years ago
Fix model serialization with external data in current directory (#17311) When original model has external data in current directory, saving the optimized model will raise File not found exception during looking for external data file under root directory "/". This fix will look under current directory for this case. I manually tested an extra case and it is working: Original model with external data in root directory ("/"), and save optimized to current directory. BTW, there is another bug found: when "session.optimized_model_external_initializers_min_size_in_bytes" is set a large value, some tensor is still pointed to the original external data file. Add a TODO in unit test for this bug. Possible solution: load external data into memory before saving model.
Author
Parents
Loading