Repository navigation
Show the auto-opt deprecation notice and clean up CLI debug output - #2738
Merged
Jambay Kinley (jambayk) merged 2 commits intoOct 30, 2026
Merged
Conversation
From the CLI quick fixes in the codebase review: - The auto-opt deprecation warning was emitted through logger.warning, which the default --log_level (ERROR) hides, so users never saw it. Print it to stderr instead, and add a deprecation note to the auto-opt how-to page and the CLI reference. - quantize printed internal "pass list" and "selected pass configs" debug output to stdout. Log them at debug level instead, and send the dataset-required warning to stderr. - run-pass --list_passes now prints its error message to stderr. Part of microsoft#2516
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Quantization debug diagnostics remain suppressed even when users explicitly request debug logging.
1 open finding
What changed in this PR
This PR improves Olive CLI diagnostics and documents the migration from auto-opt to optimize.
Changes:
- Sends deprecation notices and selected errors/warnings to stderr.
- Moves quantization diagnostics to debug logging.
- Adds regression tests and deprecation documentation.
| File | Description |
|---|---|
| test/cli/test_cli.py | Tests deprecation visibility and clean quantization stdout. |
| olive/cli/run_pass.py | Sends pass-listing errors to stderr. |
| olive/cli/quantize.py | Uses debug logging and redirects dataset warnings. |
| olive/cli/auto_opt.py | Makes the deprecation notice independent of logging level. |
| docs/source/reference/cli.rst | Adds a deprecation warning. |
| docs/source/how-to/cli/cli-auto-opt.md | Directs users to optimize. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The quantize debug diagnostics are logged while the run config is generated, but the requested log level was only applied later by the workflow runner (and never for dry runs), so `--log_level 0` still dropped them. Set the Olive logger level at the start of _run_workflow.
5 tasks
Jambay Kinley (jambayk)
approved these changes
Oct 30, 2026
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
Picks up three of the CLI quick fixes listed in the codebase review (#2516) that are still present on
main:AutoOptCommand.runemitted it withlogger.warning, but the default--log_levelis 3 (ERROR), so it never showed. It is now printed to stderr, so it shows regardless of log level. Theauto-opthow-to page and the CLI reference now carry a deprecation note pointing tooptimize.olive quantizeprintedpass list: [...]andselected pass configs: {...}to stdout on every run. These are nowlogger.debug. The "requires dataset" warning goes to stderr instead of stdout.--list_passesfails to load the pass configs, the error lines go to stderr (exit code was already 1).Other review items (ruff
target-version, which would reformat roughly 1000 lines, kebab/snake case flag cleanup, dependency upper bounds) are larger changes and are not part of this PR. Thecapture-onnx-graphbool parsing item is already covered by #2647.Checklist before requesting a review
pytest test/cli/test_cli.py: new tests pass and fail without the fix. The only failures in my env are the 11 tests that spawn theoliveconsole script, which is not on PATH because my venv is not activated. They fail the same way onmain.)lintrunner -a(ruff 0.15.11 check and format onolive/cliandtest/cli)olive auto-optnow always shows its deprecation notice, andolive quantizeno longer prints internal pass configuration to stdout.(Optional) Issue link
Part of #2516