KEMBAR78
[ONNX] Drop final None values as inputs for nodes in exporter graph by shubhambhokare1 · Pull Request #135520 · pytorch/pytorch · GitHub
Skip to content

Conversation

@shubhambhokare1
Copy link
Collaborator

When value for an optional input is not provided, it is defaulted to None, which gets translates to "" in the onnx graph. To avoid this, if we have a list of inputs and the final few are all None, strip them in the graph.

@pytorch-bot
Copy link

pytorch-bot bot commented Sep 9, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/135520

Note: Links to docs will display an error until the docs builds have been completed.

✅ You can merge normally! (2 Unrelated Failures)

As of commit 12635bc with merge base 5f7d956 (image):

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot bot added the release notes: onnx torch.onnx related changes that should show up in the release notes label Sep 9, 2024
@shubhambhokare1 shubhambhokare1 changed the title [ONNX] Drop None values as inputs for nodes in exporter graph [ONNX] Drop final None values as inputs for nodes in exporter graph Sep 9, 2024
@justinchuby justinchuby added this to the 2.5.0 milestone Sep 9, 2024
@justinchuby
Copy link
Collaborator

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Sep 9, 2024
@justinchuby justinchuby added module: onnx Related to torch.onnx topic: bug fixes topic category and removed ciflow/trunk Trigger trunk jobs on your pull request labels Sep 9, 2024
@justinchuby
Copy link
Collaborator

The release was cut: https://github.com/pytorch/pytorch/commits/release/2.5/ This may need cherry-picking @shubhambhokare1

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

shubhambhokare1 added a commit to shubhambhokare1/pytorch that referenced this pull request Sep 17, 2024
…ytorch#135520)

When value for an optional input is not provided, it is defaulted to `None`, which gets translates to "" in the onnx graph. To avoid this, if we have a list of inputs and the final few are all `None`, strip them in the graph.
Pull Request resolved: pytorch#135520
Approved by: https://github.com/justinchuby

Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com>
(cherry picked from commit e2f9a83)
Chao1Han pushed a commit to Chao1Han/pytorch that referenced this pull request Sep 20, 2024
…ytorch#135520)

When value for an optional input is not provided, it is defaulted to `None`, which gets translates to "" in the onnx graph. To avoid this, if we have a list of inputs and the final few are all `None`, strip them in the graph.
Pull Request resolved: pytorch#135520
Approved by: https://github.com/justinchuby

Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com>
kit1980 pushed a commit that referenced this pull request Sep 20, 2024
…d Drop final None values as inputs for nodes in exporter graph (#135520) (#136005)

* [ONNX] Update fake mode usage in onnx docs (#135512)

Update fake mode usage in onnx docs
Pull Request resolved: #135512
Approved by: https://github.com/justinchuby

Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com>
(cherry picked from commit 66db61f)

* [ONNX] Drop final None values as inputs for nodes in exporter graph (#135520)

When value for an optional input is not provided, it is defaulted to `None`, which gets translates to "" in the onnx graph. To avoid this, if we have a list of inputs and the final few are all `None`, strip them in the graph.
Pull Request resolved: #135520
Approved by: https://github.com/justinchuby

Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com>
(cherry picked from commit e2f9a83)
@github-actions github-actions bot deleted the sbhokare/drop-none-inputs branch October 12, 2024 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged module: onnx Related to torch.onnx open source release notes: onnx torch.onnx related changes that should show up in the release notes topic: bug fixes topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants