Skip to content

Remove dead reference to inference.onnx_config.* subpackage in HTP config generator#901

Merged
DingmaomaoBJTU merged 2 commits into
mainfrom
dingmaomaobjtu/fix-remove-dead-htp-config-refs
Jun 16, 2026
Merged

Remove dead reference to inference.onnx_config.* subpackage in HTP config generator#901
DingmaomaoBJTU merged 2 commits into
mainfrom
dingmaomaobjtu/fix-remove-dead-htp-config-refs

Conversation

@DingmaomaoBJTU

Copy link
Copy Markdown
Collaborator

Summary

Removes dead try-blocks in ExportConfigGenerator._generate_input_specs and _get_output_names that referenced the non-existent winml.modelkit.inference.onnx_config subpackage.

Changes

  • _generate_input_specs — removed the unreachable import of InputSpecGenerator and all associated logic; the function now unconditionally returns {} (callers infer inputs from the ONNX graph directly).
  • _get_output_names — removed the unreachable import of TASK_TO_OUTPUTS; the function now directly applies the task-based heuristic that was previously the fallback path.

Both imports were inside try/except Exception blocks that silently swallowed ImportError, so runtime behavior is unchanged.

Fixes #859

Delete unreachable try-blocks in _generate_input_specs and _get_output_names
that imported from the non-existent winml.modelkit.inference.onnx_config
subpackage. The functions now unconditionally return their fallback values
(empty dict for input specs, task-based heuristic for output names).

Fixes #859
@DingmaomaoBJTU DingmaomaoBJTU requested a review from a team as a code owner June 16, 2026 07:42
@xieofxie

Copy link
Copy Markdown
Contributor

Should we just remove the whole file? https://github.com/search?q=repo%3Amicrosoft%2Fwinml-cli%20config_generator&type=code it is not referenced any where and no one will maintain it

The module is not exported from the htp package __init__.py, not imported
by any other source file, and has no tests. Remove the entire file rather
than just cleaning up dead imports.

Fixes #859
@DingmaomaoBJTU DingmaomaoBJTU merged commit 489abdd into main Jun 16, 2026
9 checks passed
@DingmaomaoBJTU DingmaomaoBJTU deleted the dingmaomaobjtu/fix-remove-dead-htp-config-refs branch June 16, 2026 08:00
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.

Remove dead reference to inference.onnx_config.* subpackage in HTP config generator

2 participants