-
Notifications
You must be signed in to change notification settings - Fork 811
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
prepare repo for auto-formatters #1546
Conversation
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.
CI is now fully configured. I intentionally did not yet push the changes that will be made by the auto-formatters since there are so many of them that this PR will get unreviewable afterwards. Let me know if you are happy with the configs and I'll pull the trigger as soon as this approved. I'll also add a paragraph the contributing guidelines when the configs are approved.
Is this effort coordinated with #1534? |
cc: @abhinavarora |
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.
Hi @pmeier , I closed my PR #1534 in favor of this PR which is much more detailed. Overall your changes look great to me! I will verify them with our internal workflow as well and then approve the PR :-)
One question for you: Do you think we can use pre-commit to run clang-format as well like I was doing in #1534. That ways OSS contributors will not have to worry about it while making commits.
Hey @abhinavarora, I'm sorry I was not aware that there was another effort to add this functionality.
Yes, that is indeed a better way to deal with this. Let me adapt the PR. |
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.
Overall LGTM! Just added a nit comment. Feel free to merge the PR after addressing that. Thank you so much for enforcing high code standards in torchtext repo and making us at par with other PyTorch domain libraries.
I don't have rights, so you'll have to. Just to make sure we are not talking past each other. You want to merge this PR after the auto format changes are pushed right not before, right? Regardless, it would be nice to confirm that nothing breaks by getting the unittest workflows to pass after I have pushed the changes. But the CI currently seems toasted. Are you sure you want to merge this PR with all the changes without being able to confirm everything is fine through CI? One thing we stumbled over when adding this to |
@pmeier Thank you for sharing your experience during torchvision. In that case, let's add the changes from the formatters in this PR. Once added, we can validate the changes on CI. Since some dataset tests on CI are toasted (due to some caching issues on CI), we can also validate the chnages by running To summarize I could take on the following action items after you add the auto formatter changes:
Please let me know if you have any concerns. Thank you again for this effort :-) |
Hi @pmeier, I validated this PR against meta's internal workflow and ran into some discrepancies. In order to address these, I took the following steps:
I also merged latest code and formatted it in this PR so that there are no merge conflicts. I will go ahead and now merge this PR. Thank you so much for your great work in onboarding us to high code formatting standards! |
I don't know how Meta's internals work, but I think upgrading the internal workflows would be the way to go. The only reason There are two major improvements of
|
There are two problems with
|
Yes you'll have to tweak another thing internally to use the latest ufmt version: |
Codecov Report
@@ Coverage Diff @@
## main #1546 +/- ##
==========================================
- Coverage 85.33% 85.28% -0.05%
==========================================
Files 58 58
Lines 2496 2488 -8
==========================================
- Hits 2130 2122 -8
Misses 366 366
Continue to review full report at Codecov.
|
@pmeier you are right. I will create an option in |
FYI: a recent update in the build dependencies of |
cc: @abhinavarora |
Addresses pytorch/data#169 (comment). Don't review yet. I'll explain everything as soon as the setup is done.