Skip to content

fix: allow None dynamic_axes in OnnxLLMExporter.export#723

Open
andrewwhitecdw wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
andrewwhitecdw:andrewwhitecdw/fix/onnx-dynamic-axes-none
Open

fix: allow None dynamic_axes in OnnxLLMExporter.export#723
andrewwhitecdw wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
andrewwhitecdw:andrewwhitecdw/fix/onnx-dynamic-axes-none

Conversation

@andrewwhitecdw

Copy link
Copy Markdown

fix + regression test for None dynamic_axes handling.

OnnxLLMExporter._export_to_onnx unpacked dynamic_axes_input and dynamic_axes_output
directly with {**x, **y}, which raised TypeError when either argument
was left as the default None. Fall back to empty dicts so callers can
omit dynamic axes without crashing.

Adds a unit test that mocks torch.onnx.export and verifies the call
succeeds with dynamic_axes_input=None and dynamic_axes_output=None.
@copy-pr-bot

copy-pr-bot Bot commented Jul 24, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant