microsoft / microsoft/winml-cli

refactor: consolidate duplicated random input generation across codebase

Open
#73 1 comment 0 reactions 1 assignee View on GitHub

@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

  1. Remove legacy data/random_dataset.py
  2. Migrate test input helpers to use generate_dummy_inputs_from_specs()
  3. Integrate with winml.io.outputs for richer specs from model I/O config

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.