Skip to content

[BUG] - Export a model with control flow to ONNX is failing against the 2.9 binaries #3563

@svekars

Description

@svekars

Add Link

URL: https://docs.pytorch.org/tutorials/beginner/onnx/export_control_flow_model_to_onnx_tutorial.html
source: https://github.com/pytorch/tutorials/tree/main/beginner_source/onnx/export_control_flow_model_to_onnx_tutorial.py

Describe the bug

Log (link)

Unexpected failing examples (1):

    beginner_source/onnx/export_control_flow_model_to_onnx_tutorial.py failed leaving traceback:

    Traceback (most recent call last):
      File "/var/lib/workspace/beginner_source/onnx/export_control_flow_model_to_onnx_tutorial.py", line 109, in <module>
        onnx_program = torch.onnx.export(model, (x,), dynamo=True)
      File "/var/lib/ci-user/.local/lib/python3.10/site-packages/torch/onnx/__init__.py", line 324, in export
        return _compat.export_compat(
      File "/var/lib/ci-user/.local/lib/python3.10/site-packages/torch/onnx/_internal/exporter/_compat.py", line 167, in export_compat
        raise TypeError("f must be provided when fallback is enabled") from e
    TypeError: f must be provided when fallback is enabled

Describe your environment

  • Ubuntu/CI
  • PyTorch 2.9-RC1

cc @titaiwangms @xadupre @justinchuby

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.9bugonnxIssues relating to ONNX

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions