Repository navigation
st-zrt 0.4.1: external-data resolution for byte-loaded models - #13
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Models with ONNX external-data initializers (every model over the 2 GiB protobuf limit) previously could not be loaded from memory: ORT resolves external-data paths relative to the model file's directory, which a buffer has no way to supply.
Adds
Session::from_bytes_with_external_data(model_data, external_data_dir, ..)andModelCompilationOptions::set_input_model_from_buffer_with_external_data(..): the serialized model is spooled to a unique temporary file inside the caller-supplied external-data directory and loaded through the path-based API; the temp file is owned by the session (or a guard returned to the compile caller) and removed on drop.from_bytesis unchanged for self-contained models.Committed fixture (tiny external-data model) plus tests: resolved byte load matches the path-based reference output, spool cleanup verified, and the unresolved plain-buffer behavior documented.