Skip to content

refactor: consolidate duplicated random input generation across codebase #73

@DingmaomaoBJTU

Description

@DingmaomaoBJTU

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

Metadata

Metadata

Assignees

Labels

refactorCode refactoring

Type

No fields configured for Task.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions