Repository navigation
Support Mobius extra options in capture-onnx-graph - #2785
Merged
Xiaoyu Z (xiaoyu-work) merged 1 commit intoNov 4, 2026
Merged
Conversation
Reuse --extra_mb_options with --use_mobius_builder, exposing typed model-specific settings through MobiusBuilder.extra_options while preserving Model Builder behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the Mobius build-option changes.
No open issues 🎉
What changed in this PR
Adds model-specific Mobius build options to Olive’s ONNX capture CLI and pass configuration, while preserving existing Model Builder parsing and compatibility when options are absent.
Changes:
- Parse Mobius
key=valueoptions into JSON values or strings, including nullable values, and reject malformed entries and duplicate keys. - Forward nonempty options to
mobius.build(extra_options=...). - Document fixed-capacity Gemma4 vision usage and add tests for forwarding, validation, and coexistence with accuracy overrides.
| File | Description |
|---|---|
test/passes/onnx/test_mobius_model_builder.py |
Tests pass-level forwarding, including nullable option values. |
test/cli/test_cli.py |
Tests CLI parsing, validation, accuracy overrides, and unchanged Model Builder parsing. |
olive/passes/onnx/mobius_model_builder.py |
Adds optional extra_options configuration and forwards nonempty options. |
olive/cli/capture_onnx.py |
Adds typed Mobius option parsing and CLI integration. |
docs/source/reference/cli.rst |
Documents option syntax and a Gemma4 fixed-capacity vision example. |
Review effort: Balanced
Jambay Kinley (jambayk)
approved these changes
Nov 3, 2026
Xiaoyu Z (xiaoyu-work)
deleted the
aamancherla/mobius-extra-builder-options
branch
November 4, 2026 22:07
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.
Describe your changes
Enable the existing
capture-onnx-graph --extra_mb_optionsflag with--use_mobius_builder, forwarding model-specific options tomobius.build(extra_options=...).key=valuesettings into typed JSON values or strings, includingnullasNone; reject malformed settings and duplicate keys.MobiusBuilder.extra_optionsfor pass configurations. Omit the build keyword when options are absent, preserving compatibility with older Mobius versions.Release note:
olive capture-onnx-graph --use_mobius_buildernow accepts model-specific Mobius settings through--extra_mb_options, including fixed-capacity Gemma4 vision options.Checklist before requesting a review
lintrunner -a(Optional) Issue link
N/A.