Remove dead reference to inference.onnx_config.* subpackage in HTP config generator#901
Merged
DingmaomaoBJTU merged 2 commits intoJun 16, 2026
Merged
Conversation
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
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
xieofxie
approved these changes
Jun 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes dead
try-blocks inExportConfigGenerator._generate_input_specsand_get_output_namesthat referenced the non-existentwinml.modelkit.inference.onnx_configsubpackage.Changes
_generate_input_specs— removed the unreachable import ofInputSpecGeneratorand all associated logic; the function now unconditionally returns{}(callers infer inputs from the ONNX graph directly)._get_output_names— removed the unreachable import ofTASK_TO_OUTPUTS; the function now directly applies the task-based heuristic that was previously the fallback path.Both imports were inside
try/except Exceptionblocks that silently swallowedImportError, so runtime behavior is unchanged.Fixes #859