Skip to content

Add olive init cli#2346

Open
xiaoyu-work wants to merge 9 commits intomainfrom
xiaoyu/cli
Open

Add olive init cli#2346
xiaoyu-work wants to merge 9 commits intomainfrom
xiaoyu/cli

Conversation

@xiaoyu-work
Copy link
Collaborator

Describe your changes

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

@xiaoyu-work xiaoyu-work marked this pull request as ready for review March 10, 2026 18:08
Copy link
Collaborator

@shaahji shaahji left a comment

Choose a reason for hiding this comment

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

Few nit-picks

Please update the requirements file to include dependency on questionary

Copilot AI review requested due to automatic review settings March 23, 2026 18:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new interactive olive init CLI wizard (backed by questionary) to generate/run optimization commands for PyTorch, ONNX, and Diffusers models.

Changes:

  • Introduces olive.cli.init wizard + per-framework flow modules (pytorch_flow, onnx_flow, diffusers_flow) and shared prompt/helpers.
  • Registers the new init subcommand in the main CLI launcher.
  • Adds a comprehensive new test suite for the wizard and flow command generation.

Reviewed changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
olive/cli/launcher.py Registers the new init subcommand in the CLI entrypoint.
olive/cli/init/__init__.py Implements InitCommand to run the interactive wizard.
olive/cli/init/wizard.py Adds the interactive wizard that builds and optionally runs commands.
olive/cli/init/helpers.py Shared prompt utilities, choices, and calibration arg builder.
olive/cli/init/pytorch_flow.py PyTorch command builders/flows for optimize/export/quantize/finetune.
olive/cli/init/onnx_flow.py ONNX command builders/flows for optimize/quantize/graph opt/tuning.
olive/cli/init/diffusers_flow.py Diffusers command builders/flows for export and LoRA training.
olive/cli/optimize.py Small fixes: wikitext flag rename; peephole optimizer gating change.
requirements.txt Adds questionary dependency.
test/cli/init/* New tests covering wizard behavior and command generation for flows.

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.

3 participants