microsoft / microsoft/winml-cli
refactor: consolidate duplicated random input generation across codebase
Open
@tezheng is already working on this.
Since Mar 31, 2026.
graph-optimizer
NPU
P1
refactor
triaged
- Dominant language
- Python
- Stars
- 40
- Forks
- 11
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 50
Description
Summary
The codebase has 5+ independent random tensor generation implementations that should be consolidated onto modelkit.core.model_input_generator.
Duplication Inventory
| Location | Status |
|---|---|
core/model_input_generator.py |
CANONICAL - keep |
onnx/io.py:InputTensorSpec.to_tensor() |
Keep (different scope) |
commands/perf.py |
FIXED - now uses model_input_generator |
data/random_dataset.py |
LEGACY - superseded by datasets/random_dataset.py |
tests/optim/conftest.py:generate_random_inputs() |
Should migrate |
tests/optim/pipes/test_pipe_fusion_direct.py |
Should migrate |
Remaining Work
- Remove legacy
data/random_dataset.py - Migrate test input helpers to use
generate_dummy_inputs_from_specs() - Integrate with
winml.io.outputsfor richer specs from model I/O config
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.