fix(sys): keep --list-device consistent with the default view - #1227
Merged
Conversation
`winml sys --list-device` gathered only the device section, so `_gather_device_info` ran without `ep_info` and skipped the `device_facts` enrichment that folds Architecture (and Driver, when sysinfo has none) into each device's `details`. The default view gathers EPs too, so the same hardware reported different `details` keys depending on which view surfaced it -- on an Intel host the NPU/GPU rows lost `architecture` entirely. Gather the EP inventory whenever devices are requested and let `eps` decide only whether the `executionProviders` section is emitted, so the JSON payload shape of `--list-device` is unchanged. EP probing failures stay non-fatal for a devices-only request since enrichment is best-effort.
xieofxie
approved these changes
Jul 28, 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
winml sys --list-devicereported fewer devicedetailsthanwinml sysforthe same hardware. On the OV e2e agent (Intel Core Ultra 7 258V + Arc 140V + AI
Boost NPU) the NPU/GPU rows lost
architectureentirely, failingTestSysCrossViewConsistency::test_devices_match_across_default_and_list_device_viewsin the
pytest: test_sys_e2e.pystep (build20260727.1,E2E Test — OV).Root cause
_gather_device_infofoldsdevice_facts(Architecture, and Driver whensysinfo has none) into each device's
details, and its only source for thosefacts is the EP inventory returned by
_gather_ep_info— filesystem-backed EPsare registered in isolated subprocesses, so the parent process can only see
those facts through the serialized inventory.
_gathergathered that inventory only when the EP section was requested:The default view asks for both sections, so enrichment ran.
--list-deviceasks for devices only, so
ep_infowasNoneand enrichment silentlyno-oped. The mismatch only surfaces on hosts whose EPs actually report an
Architecture fact, which is why the OV stage caught it and the others did not.
Fix
Gather the EP inventory whenever devices are requested, and let
epsdecideonly whether the
executionProviderssection is emitted. The JSON payloadshape of
--list-deviceis unchanged (still{"devices": [...]}), so theexisting single-key shape guard still holds. Because enrichment is
best-effort, an EP probing failure stays non-fatal for a devices-only request;
an explicitly pinned
--list-epstill raises as before.Verification
On the OV agent,
--list-deviceand the default view now agree:pytest -m e2e tests/e2e/test_sys_e2e.py— 19 passed (the failing case now passes)pytest tests/unit/commands/test_sys_device_info.py— 8 passed (4 new)pytest tests/unit/cli/test_main.py tests/cli/test_main.py— 48 passed