fix: add VitPose config-driven dummy inputs - #1299
Conversation
REQUEST_CHANGESReviewed GitHub PR #1299 at exact head Required change
Verified in this pass
No PR branch, PR body, evidence root, label, draft state, or original PR #1195 content was modified by this reviewer. |
0203b48 to
e6d5aa4
Compare
|
APPROVE (content-only reviewer verdict; not a GitHub Review state) Reviewed PR: #1299
Final reviewer verdict: APPROVE for head 63bfd4a. |
63bfd4a to
8d3d74d
Compare
|
Scope update: this branch was narrowed from combined head \63bfd4ad\ to \8d3d74d3. It now contains only the VitPose CPU recipes and recipe-free Vision I/O recovery. Generic Perf input-range consumption moved to #1309; the VitPose evaluator processor fallback moved to #1310. The earlier skill reviewer APPROVE comment evaluated the combined head and should not be treated as review of this narrowed head. Focused validation on the narrowed slice: 103 export I/O tests passed, plus Ruff check and format check. |
8d3d74d to
5635a06
Compare
|
Implementation update: the generic \export/io.py\ recovery has been removed entirely. The branch now fixes the Optimum processor-list \IndexError\ in the existing VitPose model adapter by registering a \VitPoseIOConfig\ that preserves Optimum's declarations/patcher and replaces only its static dummy generator. Generic I/O files are byte-for-byte unchanged from \main. Validation: 101 focused tests passed; Ruff check and format check passed. |
|
Final-head end-to-end validation on \5635a06a: recipe-free CPU fp32 \winml build\ passed and generated \model.onnx\ with \pixel_values [1,3,256,192] float32 -> heatmaps; checked-in fp32 recipe build exited 0 in 73.5s; checked-in fp16 recipe build exited 0 in 82.7s and completed the FP16 stage. Both recipe builds generated final \model.onnx\ artifacts. GitHub checks are 9/9 successful. |
Summary
Adds CPU fp32/fp16 recipes for
nielsr/vitpose-base-simpleand fixes recipe-free VitPose input generation.Optimum's
VitPoseDummyInputGeneratorinherits a static Vision generator that reloads preprocessors and indexes the result with[-1]. Config-only resolution has no loaded processor, so that path raisesIndexError. A WinMLVitPoseIOConfignow preserves Optimum's VitPose I/O declarations and model patcher while replacing only its dummy generator with the config-drivenDummyVisionInputGenerator.The workaround is contained in the existing VitPose model adapter. Generic export I/O behavior is unchanged.
The generic Perf range-consumption change was split into #1309. The VitPose evaluator processor fallback was split into #1310.
Baseline and outcome
Without a recipe, current-main baseline export resolves
VitPoseOnnxConfigbut fails while its static dummy generator loads an empty processor list:With this change, recipe-free input resolution produces
pixel_values[1, 3, 256, 192]. The checked-in recipes represent verified CPU fp32/fp16 coverage.Validation
5635a06aee12a2dfe3d2f0a4e7c92dc8ac00f8f1winml build: passed;pixel_values[1, 3, 256, 192]float32 ->heatmaps; finalmodel.onnxgeneratedwinml build: exit 0; completed in 73.5s; finalmodel.onnxgeneratedwinml build: exit 0; completed in 82.7s (Export 38.0s, Optimize 35.3s, FP16 8.8s); finalmodel.onnxgeneratedtests/unit/export/test_io.py+tests/unit/models/test_vitpose_mapping.py: 101 passedFiles
examples/recipes/nielsr_vitpose-base-simple/cpu/cpu/keypoint-detection_fp32_config.jsonexamples/recipes/nielsr_vitpose-base-simple/cpu/cpu/keypoint-detection_fp16_config.jsonsrc/winml/modelkit/models/hf/vitpose.pytests/unit/models/test_vitpose_mapping.py