Skip to content

Fix analyze schema fallback for runtime-specific ops - #1304

Open
fangyangci wants to merge 2 commits into
mainfrom
fix/analyze-schema-fallback-20260812-203702
Open

Fix analyze schema fallback for runtime-specific ops#1304
fangyangci wants to merge 2 commits into
mainfrom
fix/analyze-schema-fallback-20260812-203702

Conversation

@fangyangci

Copy link
Copy Markdown
Contributor

Summary

  • handle missing ONNX schema lookups in runtime checker by converting SchemaError into OpUnsupportedError
  • keep analysis running and classify those nodes as unknown/unsupported instead of failing the whole command
  • reduce noisy per-node unsupported logs by downgrading OpUnsupportedError logging from error to debug
  • add regression coverage for missing-schema behavior in runtime checker query helper tests

Validation

  • uv run pytest tests/unit/analyze/core/test_runtime_checker_query_helpers.py
  • uv run winml analyze -m "C:\Users\fangyangci.foundry\cache\models\Microsoft\qwen3-0.6b-cuda-gpu-2\v2\model.onnx" --debug

Notes

  • uv.lock is intentionally excluded from this PR.

Catch ONNX SchemaError during node schema lookup and reclassify as OpUnsupportedError so analyze continues and marks unknown/unsupported ops instead of failing. Also downgrade per-node OpUnsupportedError logging to debug to reduce noisy error output, and add regression coverage.
@fangyangci
fangyangci requested a review from a team as a code owner August 12, 2026 12:37
@fangyangci
fangyangci enabled auto-merge (squash) August 12, 2026 12:40

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The schema fallback keeps analyze running, but the current exception mapping loses the actual unsupported cause in normal results and suppresses unrelated unsupported-op diagnostics.

Comment thread src/winml/modelkit/analyze/core/runtime_checker_query.py
Comment thread src/winml/modelkit/analyze/core/runtime_checker_query.py Outdated
Map run_for_node condition-extraction exceptions to specific reasons so schema misses and generic unsupported ops are distinguishable in non-debug payloads. Add end-to-end RuntimeCheckerQuery tests asserting returned reasons for schema-miss and unsupported-op paths.
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.

2 participants