feat(config): add dynamic export controls to config command#1106
Open
xieofxie wants to merge 1 commit into
Open
feat(config): add dynamic export controls to config command#1106xieofxie wants to merge 1 commit into
xieofxie wants to merge 1 commit into
Conversation
Mirror build/perf by adding --input-specs, --export-config, and --dynamic-axes to `winml config`. Overrides are applied via the shared merge_export_overrides helper so --input-specs patches auto-resolved input tensors by name (preserving unlisted inputs and their dtype/value_range) and symbolic dims re-derive dynamic axes. Wired into the single, --module list, and composite-pipeline paths; rejected for pre-exported ONNX inputs and configs with export=null. Docs and config CLI tests updated.
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
Adds the dynamic export controls (
--input-specs,--export-config,--dynamic-axes) towinml config, bringing it to parity withwinml build/winml perf/winml export. This is a follow-up to #1083, which introduced these controls for build/perf and the sharedcli_utilsoption/loader helpers.What changed
commands/config.pyinput_specs_option,export_config_option,dynamic_axes_option) and their params.cli_utils.load_export_overrides(validates early, doesn't clobber auto-detected fields)._merge_export_overrideshelper applies them via the sharedmerge_export_overrides, so--input-specspatches the auto-resolvedinput_tensorsby name (unlisted inputs and theirdtype/value_rangepreserved) and symbolic dims re-derive dynamic axes throughWinMLExportConfig.__post_init__.--modulelist, and composite-pipeline paths.export=null(clearUsageError).docs/commands/config.md: three new flag rows, an example, and a pitfall note.tests/unit/commands/test_config_cli.py:TestConfigExportControls— help visibility, override forwarding/parsing, no-op when absent, and ONNX rejection.Verification
ruff check+ruff formatclean.tests/unit/commands/test_config_cli.py(55) andtest_config_composite_resolution.py+test_config_value_priority.py(63) pass.