Skip to content
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

Renaming: BoundingBox -> BoundingBoxes #7778

Merged
merged 6 commits into from
Jul 31, 2023
Merged

Conversation

NicolasHug
Copy link
Member

@NicolasHug NicolasHug commented Jul 31, 2023

EDIT: actually all this does is rename BoudingBox into BoundingBoxes: the class, and its occurrences in transforms like SanitizeBoudingBoxES. BoudingBoxFormat is left unchanged. Also renamed the correspdoning kernels to take an extra es.


This PR renames:

  1. BoundingBoxFormat into BBoxFormat
  2. The BoundingBox class (and its use in methods like SanitizedBoundingBox into BBoxes:
find . | grep -e ".py$" -e ".rst$" | xargs sed -i "s/BoundingBoxFormat/BBoxFormat/g
find . | grep -e ".py$" -e ".rst$" | xargs sed -i "s/BoundingBox/BBoxes/g"

A few thing to note:

  • Feel free to disagree on 1. and suggest alternatives. (We could name it BBoxesFormat but meh. BoundingBoxesFormat is pretty long IMHO.)
  • Feel free to disagree about shortening BoundingBox into BBox. Personally, I think BBox is just as expressive and clear, for half of the length needed (and BoundingBoxesFormat.XYXY or SanitizeBoundingBoxes are kinda long), so I think its a good thing. I won't die on that hill though.
  • Ultimately the only thing I care about is to add an s to the BoundingBox class - we had agreed on that already. The rest, I'll yield to whatever you prefer.

CC @vfdev-5 @pmeier

cc @vfdev-5

@pytorch-bot
Copy link

pytorch-bot bot commented Jul 31, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/7778

Note: Links to docs will display an error until the docs builds have been completed.

❌ 4 New Failures

As of commit 829e50e:

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

Copy link
Collaborator

@pmeier pmeier left a comment

Choose a reason for hiding this comment

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

👍 for 1. and 3. For 2. I prefer keeping it in the long version, i.e. BoundingBoxes and BoundingBoxFormat. However, I'm not going to block over that. @vfdev-5 opinion?

Edit: Sorry this is confusing. With 1., 2. and 3. I mean the three bullet points in the top comment. To re-iterate, I prefer BoundingBoxes and BoundingBoxFormat

@pmeier
Copy link
Collaborator

pmeier commented Jul 31, 2023

Lint failures are real. You need to run the auto-formatters, since a few lines are shrinking when going to BBoxes.

@NicolasHug
Copy link
Member Author

yes and rename the kernels as well.. just looking for consensus first

@@ -349,15 +349,15 @@ def test__transform_bounding_box_clamping(self, mocker):
),
)

bounding_box = make_bounding_box(
bounding_boxes = make_bounding_box(
Copy link
Member Author

Choose a reason for hiding this comment

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

This call is a bit awkward now.

I didn't want to change make_bouding_box into make_bounding_boxes because make_bouding_boxes already exists.

I'm hoping we'll be able to get rid of the current make_bouding_boxes util soon anyway? CC @pmeier

@NicolasHug NicolasHug changed the title Renaming: BoundingBox -> BBoxes Renaming: BoundingBox -> BoundingBoxes Jul 31, 2023
@NicolasHug
Copy link
Member Author

Tests were passing in previous commit and docs are now passing, merging

@NicolasHug NicolasHug merged commit 332bff9 into pytorch:main Jul 31, 2023
57 of 61 checks passed
facebook-github-bot pushed a commit that referenced this pull request Aug 25, 2023
Reviewed By: matteobettini

Differential Revision: D48642250

fbshipit-source-id: 4b73395c906899de4c0ee049dc26436bb435ce1b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants