Skip to content

Conversation

kolasaniv1996
Copy link
Contributor

Description

This PR corrects the Pad operator example in the Python API documentation. The original code incorrectly treated value as an input tensor and used an invalid pads data type. The updated example sets value as a float attribute, uses INT64 for pads, and includes OPSET 11 compatibility.

Motivation and Context

The incorrect example could lead users to create invalid ONNX models. This fix ensures the documentation reflects proper usage of the Pad operator and ONNX standards, improving the developer experience.

@kolasaniv1996 kolasaniv1996 requested a review from a team as a code owner February 14, 2025 01:55
Copy link

codecov bot commented Feb 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 57.50%. Comparing base (cb1d2af) to head (31389b5).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6702   +/-   ##
=======================================
  Coverage   57.50%   57.50%           
=======================================
  Files         507      507           
  Lines       31636    31636           
  Branches     3048     3048           
=======================================
  Hits        18191    18191           
  Misses      12618    12618           
  Partials      827      827           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@justinchuby justinchuby left a comment

Choose a reason for hiding this comment

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

Thanks

Signed-off-by: vivek kolasani kolasaniv1996@gmail.com
Signed-off-by: EC2 Default User <ec2-user@ip-172-31-73-195.ec2.internal>
@kolasaniv1996
Copy link
Contributor Author

Thanks, please merge when you get a chance

@justinchuby justinchuby added the topic: documentation Issues related to ONNX documentation label Feb 14, 2025
@justinchuby justinchuby added this pull request to the merge queue Feb 14, 2025
Merged via the queue into onnx:main with commit 8f436ec Feb 14, 2025
34 checks passed
seungwoo-ji-03 pushed a commit to seungwoo-ji-03/onnx that referenced this pull request Feb 17, 2025
…onnx#6702)

### Description
This PR corrects the `Pad` operator example in the Python API
documentation. The original code incorrectly treated `value` as an input
tensor and used an invalid `pads` data type. The updated example sets
`value` as a float attribute, uses `INT64` for `pads`, and includes
OPSET 11 compatibility.

### Motivation and Context
The incorrect example could lead users to create invalid ONNX models.
This fix ensures the documentation reflects proper usage of the `Pad`
operator and ONNX standards, improving the developer experience.

Signed-off-by: vivek kolasani kolasaniv1996@gmail.com
Signed-off-by: EC2 Default User <ec2-user@ip-172-31-73-195.ec2.internal>
Co-authored-by: EC2 Default User <ec2-user@ip-172-31-73-195.ec2.internal>
Signed-off-by: seungwoo-ji <seungwoo.ji@nuvilab.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: documentation Issues related to ONNX documentation
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants