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
Contributor

fix + regression test for None dynamic_axes handling.

@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.

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.

Signed-off-by: Andrew White <andrewh@cdw.com>
@andrewwhitecdw
andrewwhitecdw force-pushed the andrewwhitecdw/fix/onnx-dynamic-axes-none branch from 3048213 to 95e727b Compare July 26, 2026 04:13
@oyilmaz-nvidia

Copy link
Copy Markdown
Contributor

/ok to test 95e727b

@oyilmaz-nvidia
oyilmaz-nvidia enabled auto-merge (squash) August 18, 2026 22:37

@oyilmaz-nvidia oyilmaz-nvidia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linting issues need to be fixed before merging.

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.

2 participants