Skip to content

Add tests for ONNX function preservation in optimizer - #317

Open
take-cheeze wants to merge 1 commit into
onnx:mainfrom
take-cheeze:claude/onnx-function-test-optimizer-n5vi9t
Open

Add tests for ONNX function preservation in optimizer#317
take-cheeze wants to merge 1 commit into
onnx:mainfrom
take-cheeze:claude/onnx-function-test-optimizer-n5vi9t

Conversation

@take-cheeze

Copy link
Copy Markdown
Member

Add tests verifying that onnxoptimizer.optimize preserves model-local functions. Unlike the approach in #199, which relied on torch.onnx.export(export_modules_as_functions=...) (a deprecated legacy exporter feature), these tests build functions directly with onnx.helper.make_function and the onnx text parser, matching the existing test idioms and avoiding a torch/torchvision dependency.

closes #194

Claude-Session: https://claude.ai/code/session_0162JuH5K5FP2hCFYJRrKC49

@take-cheeze
take-cheeze requested review from a team as code owners July 24, 2026 03:13
@take-cheeze
take-cheeze force-pushed the claude/onnx-function-test-optimizer-n5vi9t branch 2 times, most recently from 4f07d21 to 4f67824 Compare July 24, 2026 03:29
Add tests verifying that onnxoptimizer.optimize preserves model-local
functions. Unlike the approach in onnx#199, which relied on
torch.onnx.export(export_modules_as_functions=...) (a deprecated legacy
exporter feature), these tests build functions directly with
onnx.helper.make_function and the onnx text parser, matching the
existing test idioms and avoiding a torch/torchvision dependency.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0162JuH5K5FP2hCFYJRrKC49

Signed-off-by: Takeshi Watanabe <takechi101010@gmail.com>
Signed-off-by: take-cheeze <takechi101010@gmail.com>
@take-cheeze
take-cheeze force-pushed the claude/onnx-function-test-optimizer-n5vi9t branch from 4f67824 to df6d6a8 Compare July 24, 2026 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ONNX function test case

2 participants