Skip to content

Support Mobius extra options in capture-onnx-graph - #2785

Merged
Xiaoyu Z (xiaoyu-work) merged 1 commit into
mainfrom
aamancherla/mobius-extra-builder-options
Nov 4, 2026
Merged

Xiaoyu Z (xiaoyu-work) merged 1 commit into
mainfrom
aamancherla/mobius-extra-builder-options

Conversation

@ananyaa-ms

@ananyaa-ms ananyaa-ms commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes

Enable the existing capture-onnx-graph --extra_mb_options flag with --use_mobius_builder, forwarding model-specific options to mobius.build(extra_options=...).

  • Parse comma-separated key=value settings into typed JSON values or strings, including null as None; reject malformed settings and duplicate keys.
  • Expose MobiusBuilder.extra_options for pass configurations. Omit the build keyword when options are absent, preserving compatibility with older Mobius versions.
  • Document fixed-capacity Gemma4 vision options and cover forwarding, validation, nullable values, and coexistence with accuracy overrides.

Release note: olive capture-onnx-graph --use_mobius_builder now accepts model-specific Mobius settings through --extra_mb_options, including fixed-capacity Gemma4 vision options.

Checklist before requesting a review

  • Add unit tests for this change.
  • Make sure all tests can pass.
  • Update documents if necessary.
  • Lint and apply fixes to your code by running lintrunner -a
  • Is this a user-facing change? If yes, give a description of this change to be included in the release notes.

(Optional) Issue link

N/A.

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>
Copilot AI balanced review requested due to automatic review settings November 3, 2026 18:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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=value options 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

@xiaoyu-work
Xiaoyu Z (xiaoyu-work) merged commit 336deb7 into main Nov 4, 2026
13 checks passed
@xiaoyu-work
Xiaoyu Z (xiaoyu-work) deleted the aamancherla/mobius-extra-builder-options branch November 4, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants