Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to address dynamic-shape handling around KV-cache tensors for the image-text-to-text task, and adds a way to override the ONNX opset used by the Qwen2.5-VL export script.
Changes:
- Adjust dynamic shape specifications for
past_key_valuesinimage_text_to_textinputs. - Gate the
GenerationMixin.prepare_inputs_for_generationpatch by an additional transformers version upper bound and update related unit test skip logic. - Add an optional
opsetparameter to the Qwen2.5-VL export entrypoint and update the CI export unit test to pass a specific opset.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
onnx_diagnostic/torch_export_patches/patches/_patch_transformers_generation_mixin.py |
Adds an upper-bound version condition for when prepare_inputs_for_generation is patched. |
onnx_diagnostic/tasks/image_text_to_text.py |
Updates dynamic-shape metadata for past_key_values (KV cache) to include a dynamic sequence/cache dimension. |
onnx_diagnostic/ci_models/export_qwen25_vl.py |
Adds an optional opset argument and uses it to select target_opset. |
_unittests/ut_torch_export_patches/test_patch_transformers.py |
Skips a subtest for transformers versions at/above the new boundary. |
_unittests/ut_ci_models/test_ci_export.py |
Passes opset=24 into the Qwen2.5-VL export main() in the unit test. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| atol: float = 0.01, | ||
| mismatch01: float = 0.1, | ||
| profile_exporter: bool = False, | ||
| opset: Optional[int] = None, | ||
| ): |
There was a problem hiding this comment.
opset was added as a main() parameter and is used to pick target_opset, but it is not wired to the CLI entrypoint: get_parser() in ci_helpers.py does not define an --opset option, and the __main__ call site doesn’t pass one. If the intent is to make opset user-configurable from the command line, add a parser argument and forward args.opset into main() (otherwise consider clarifying that this is only for programmatic use).
No description provided.