Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[BugFix] calling pad with immutable sequence #1075

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

SamAdamDay
Copy link
Contributor

Description

Allow functional.pad to take a tuple for pad_size.

Motivation and Context

I recently tried to use pad with a tuple for pad_size, but it didn't work as expected.

Close #1074

  • I have raised an issue to propose this change (required for new features and bug fixes)

Types of changes

What types of changes does your code introduce? Remove all that do not apply:

  • Bug fix (non-breaking change which fixes an issue)

Checklist

Go over all the following points, and put an x in all the boxes that apply.
If you are unsure about any of these, don't hesitate to ask. We are here to help!

  • I have read the CONTRIBUTION guide (required)
  • My change requires a change to the documentation.
  • I have updated the tests accordingly (required for a bug fix or a new feature).
  • I have updated the documentation accordingly.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 6, 2024
@SamAdamDay
Copy link
Contributor Author

One meta-question: I raised an issue because the PR template told me to, but in future should I just make a PR for such a minor change?

Copy link
Contributor

@vmoens vmoens left a comment

Choose a reason for hiding this comment

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

LGTM thanks!

@vmoens
Copy link
Contributor

vmoens commented Nov 6, 2024

One meta-question: I raised an issue because the PR template told me to, but in future should I just make a PR for such a minor change?

Yep you can definitely do that!
If the work is taking you more than an hour it's probably worth raising an issue firt

@vmoens vmoens added the bug Something isn't working label Nov 6, 2024
@vmoens vmoens changed the title Fix calling pad with immutable sequence [BugFix] calling pad with immutable sequence Nov 6, 2024
@vmoens vmoens merged commit 760c537 into pytorch:main Nov 6, 2024
49 of 53 checks passed
@SamAdamDay SamAdamDay deleted the pad_immutable branch November 6, 2024 14:54
vmoens pushed a commit that referenced this pull request Nov 14, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] pad doesn't work with a tuple pad_size
3 participants