Repository navigation
Leave mobile ONNX runtimes out of the tool package - #114
Merged
Merged
Conversation
The tool package grew from 4.8 MB at 1.0.0-beta.4 to 168 MB at 1.0.0-rc.1. ONNX Runtime, added for the semantic reranker (#110), ships native binaries for iOS and Android next to the desktop and server ones, and a framework-dependent publish copies them all. Those two files alone were 114 MB, and the emulator can't run on either platform. Remove runtimes/ios and runtimes/android from the publish output, which is what `dotnet pack` packs for a tool. The package is now 55 MB. The container image loses the same files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
The
AzureSearchEmulatortool package grew from 4.8 MB at 1.0.0-beta.4 to 168 MB (270 MB unpacked) at 1.0.0-rc.1. nuget.org accepted the rc.1 upload, but it was still not listed long after the Aspire package from the same push was.Why it grew
The semantic reranker (#110) added
Microsoft.ML.OnnxRuntime. That package ships native binaries for every platform it supports, and a framework-dependent publish, which is what a tool packs, copies all of them. The largest two are mobile ones the emulator can never run on:runtimes/ios/native/onnxruntime.xcframework.zipruntimes/android/native/onnxruntime.aarThe change
A target in
AzureSearchEmulator.csprojremovesruntimes/ios/andruntimes/android/from the publish output after it is computed. The package is now 55 MB.The desktop and server runtimes (
linux-x64,linux-arm64,osx-arm64,win-x64,win-arm64) all stay, so the tool still runs everywhere it did. The Docker image is built bydotnet publishas well, so it loses the same unused files.Verified
dotnet packoutput contains noruntimes/iosorruntimes/androidentries.Emulator__SemanticRanker__Enabled=true. The model downloaded and loaded, and a semantic query returned a cross-encoder@search.rerankerScore(3.99). This shows ONNX Runtime still loads from the trimmed package.This only takes effect in the next release, either an rc.2 or folded into the next version.
🤖 Generated with Claude Code