-
Notifications
You must be signed in to change notification settings - Fork 27.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure tensors are at least 1d for pad and concat #17179
Conversation
cc @sgugger |
The documentation is not available anymore as the PR was closed or merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! The fix looks good but we need something that supports more PyTorch versions.
Also, could you add a test that is failing without the fix? Or do we say such a test is going to be the current failing test in #17166 ?
let me add a quick unit test |
@sgugger I am not sure what's up with code quality CI. I cannot reformat the file it complains about locally. Any idea what could be causing this? I have removed the changes to the offending file, let's see if that fixes it. |
Ok, CI is green now :D |
Thanks again! |
* Ensure tensors are at least 1d for pad and concat * Compatibility * Fix * Fix * Add test * Retrigger CI * Consistency with master * Retrigger CI
* Ensure tensors are at least 1d for pad and concat * Compatibility * Fix * Fix * Add test * Retrigger CI * Consistency with master * Retrigger CI
* Ensure tensors are at least 1d for pad and concat * Compatibility * Fix * Fix * Add test * Retrigger CI * Consistency with master * Retrigger CI
What does this PR do?
Ensures that tensors are at least 1d in
pad_and_concatenate
utility functions, and usesatleast_1d
methods uniformly in the entire file.Fixes # (issue)
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.