-
Notifications
You must be signed in to change notification settings - Fork 7.1k
upgrade usort to 1.0.2
and black to 22.3.0
#5106
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
Conversation
💊 CI failures summary and remediationsAs of commit e46fbc2 (more details on the Dr. CI page):
🕵️ 1 new failure recognized by patternsThe following CI failures do not appear to be due to upstream breakages:
|
Job | Step | Action |
---|---|---|
set -ex | ||
source packaging/windows/internal/vc_install_helper.sh | ||
packaging/build_cmake.sh | ||
🔁 rerun |
This comment was automatically generated by Dr. CI (expand for details).
Please report bugs/suggestions to the (internal) Dr. CI Users group.
Thanks @pmeier for the initiative. I'll have to make sure updating to 1.0 doesn't clash with the internal tooling. Since I'll be on PTO in 2 days, let's do all this next year :) ? |
1.0.0
1.0.0
and black to 22.3.0
1.0.0
and black to 22.3.01.0.2
and black to 22.3.0
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.
After a lot of back and forth I think I finally managed to make this consistent with internal linting. There was a minor formatting bug on the internal side that was fixed as well.
The repo is quiet today so it's a good time to merge this. I'll approve and merge, if anything goes wrong by EOD I'll have time to revert. Current CI failure are unrelated
Hey @NicolasHug! You merged this PR, but no labels were added. The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py |
I have my branch on proto transforms fully conflicting now ))) |
Up versions according to #5106
Your best bet is probably to format with the new versions before merging with |
Summary: * upgrade usort to * Also update black * Actually use 1.0.2 * Apply pre-commit Reviewed By: datumbox Differential Revision: D38071391 fbshipit-source-id: ecfb6639e5ccfcc9ff7aa4db5f06a7fab05e9074 Co-authored-by: Nicolas Hug <[email protected]>
* [proto] Added few transforms tests, part 1 (#6262) * Added supported/unsupported data checks in the tests for cutmix/mixup * Added RandomRotation, RandomAffine transforms tests * Added tests for RandomZoomOut, Pad * Update test_prototype_transforms.py * Added RandomCrop transform and tests (#6271) * [proto] Added GaussianBlur transform and tests (#6273) * Added GaussianBlur transform and tests * Fixing code format * Copied correctness test * [proto] Added random color transforms and tests (#6275) * Added random color transforms and tests * Disable smoke test for RandomSolarize, RandomAdjustSharpness * Added RandomPerspective and tests (#6284) - replaced real image creation by mocks for other tests * Added more functional tests (#6285) * [proto] Added elastic transform and tests (#6295) * WIP [proto] Added functional elastic transform with tests * Added more functional tests * WIP on elastic op * Added elastic transform and tests * Added tests * Added tests for ElasticTransform * Try to format code as in #5106 * Fixed bug in affine get_params test * Implemented RandomErase on PIL input as fallback to tensors (#6309) Added tests * Added image_size computation for BoundingBox.rotate if expand (#6319) * Added image_size computation for BoundingBox.rotate if expand * Added tests * Added erase_image_pil and eager/jit erase_image_tensor test (#6320) * Updates according to the review Co-authored-by: Vasilis Vryniotis <[email protected]>
Summary: * [proto] Added few transforms tests, part 1 (#6262) * Added supported/unsupported data checks in the tests for cutmix/mixup * Added RandomRotation, RandomAffine transforms tests * Added tests for RandomZoomOut, Pad * Update test_prototype_transforms.py * Added RandomCrop transform and tests (#6271) * [proto] Added GaussianBlur transform and tests (#6273) * Added GaussianBlur transform and tests * Fixing code format * Copied correctness test * [proto] Added random color transforms and tests (#6275) * Added random color transforms and tests * Disable smoke test for RandomSolarize, RandomAdjustSharpness * Added RandomPerspective and tests (#6284) - replaced real image creation by mocks for other tests * Added more functional tests (#6285) * [proto] Added elastic transform and tests (#6295) * WIP [proto] Added functional elastic transform with tests * Added more functional tests * WIP on elastic op * Added elastic transform and tests * Added tests * Added tests for ElasticTransform * Try to format code as in #5106 * Fixed bug in affine get_params test * Implemented RandomErase on PIL input as fallback to tensors (#6309) Added tests * Added image_size computation for BoundingBox.rotate if expand (#6319) * Added image_size computation for BoundingBox.rotate if expand * Added tests * Added erase_image_pil and eager/jit erase_image_tensor test (#6320) * Updates according to the review Reviewed By: NicolasHug Differential Revision: D38351755 fbshipit-source-id: 4b52b530f93c3dfa92326e01803665cb44003a63 Co-authored-by: Vasilis Vryniotis <[email protected]>
Compared to
usort==0.6.4
which we are currently using, there are two major improvments in1.0.0
:import
statements that import from the same module will be merged into one.import
statement are sorted lexiographically.For example
will be turned into
That means we need to pay even less attention to
import
's while reviewing and would prevent stuff likevision/torchvision/prototype/datasets/_folder.py
Lines 5 to 6 in 582d12a
Note that
usort==1.0.0
is not yet released, but it is scheduled for the next weeks. I ran locally with the current preview1.0.0rc1
and it works as expected. Since we will only touchimport
's, the noise ongit blame
is minimal.