fix(sys): gate diagnostic sections behind -v; route json-mode logs to stderr#737
Merged
Merged
Conversation
… stderr - Move Backend SDKs and Export Readiness panels into --verbose; verbose now lists all backends including not-installed rows so the section is informative even when no SDK is installed. - Route the per-command RichHandler to stderr under --format json so DEBUG/WARNING logs no longer corrupt the JSON payload on stdout. - Update _run_sys_json to read result.stdout (Click 8.4's result.output still aggregates stderr). Fixes #736
DingmaomaoBJTU
approved these changes
May 26, 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.
Summary
Backend SDKsandExport Readinesspanels into--verbose; verbose now lists all backends including not-installed rows so the section is informative even when no SDK is installed.RichHandlerto stderr under--format jsonso DEBUG/WARNING logs no longer corrupt the JSON payload on stdout._run_sys_jsonto readresult.stdout(Click 8.4'sresult.outputstill aggregates stderr).Fixes #736
Before / After
1. Default
winml sys— drops two diagnostic panelsBefore (on a host with at least one backend SDK installed, the panels show up by default; below is the shape they took):
After — those panels are gone from default output; users only see Environment, ML Libraries, Devices, and Execution Providers.
2.
winml sys -v— sections are now always populatedAfter (verbose now lists every backend regardless of install status, so the panel is meaningful on a stock dev box):
3.
winml sys --verbose --format json— stdout is now valid JSONBefore — RichHandler writes DEBUG records to the same console as the JSON, so stdout starts with log lines and
json.loadsfails:After — stdout contains only JSON; the same log records are emitted on stderr where they belong: