Skip to content

Rename features.SegmentationMask to features.Mask #6579

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

Merged
merged 6 commits into from
Sep 14, 2022

Conversation

pmeier
Copy link
Collaborator

@pmeier pmeier commented Sep 14, 2022

As discussed in #6574 (comment).

The following individual things were done:

  • rename features.SegmentationMask to features.Mask
  • rename the module torchvision.prototype.features._segmentation_mask to torchvision.prototype.features._mask
  • rename all prototype transform kernels from *_segmentation_mask to *_mask
  • rename the first parameter in the kernels above to mask
  • rename the mask generator utility make_detection_and_segmentation_masks to make_masks
  • Change error messages that mention "segmentation masks" to "masks"
  • Rename some variables that are named segmentation_mask to mask

I'm aware this will be a pain to review. I used my IDE to refactor and searched for all appropriate strings afterwards. I'm fairly confident, I did cover everything. Locally, all tests and mypy are passing so this is an extra layer of confidence. Let's hope our CI agrees.

Copy link
Contributor

@datumbox datumbox 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 a lot. Feel free to merge on Green CI.

@pmeier pmeier merged commit 1ea73f5 into pytorch:main Sep 14, 2022
@pmeier pmeier deleted the rename-segmentation-mask branch September 14, 2022 09:29
@github-actions
Copy link

Hey @pmeier!

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

facebook-github-bot pushed a commit that referenced this pull request Sep 15, 2022
Summary:
* rename features.SegmentationMask -> features.Mask

* rename kernels *_segmentation_mask -> *_mask and cleanup input name

* cleanup

* rename module _segmentation_mask.py -> _mask.py

* fix test

Reviewed By: jdsgomes

Differential Revision: D39543280

fbshipit-source-id: 72d5e209b45025df16047513ce1b3910d44fd352
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.

3 participants