Added typing annotations to models/segmentation #4227
Merged
datumbox merged 8 commits intopytorch:mainfrom Aug 23, 2021
Merged
Conversation
Closed
Contributor
Author
|
Docstring issue handled in #4228 |
frgfm
commented
Aug 23, 2021
| backbone_name: str, | ||
| num_classes: int, | ||
| aux: bool, | ||
| aux: Optional[bool], |
Contributor
Author
There was a problem hiding this comment.
it's not strict, but isn't Optional constrained to argument with specified default value being None?
Contributor
There was a problem hiding this comment.
It's because it can get None value from the calling methods... Mypy was complaining about it.
86d5a23 to
9eaddd9
Compare
facebook-github-bot
pushed a commit
that referenced
this pull request
Aug 26, 2021
Summary: * style: Added typing annotations to segmentation/_utils * style: Added typing annotations to segmentation/segmentation * style: Added typing annotations to remaining segmentation models * style: Fixed typing of DeepLab * style: Fixed typing * fix: Fixed typing annotations & default values * Fixing python_type_check Reviewed By: fmassa Differential Revision: D30525894 fbshipit-source-id: 9926506955fba566ce61d17274ff7d86ed496383
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Following up on #2025, this PR adds missing typing annotations in
models/segmentation.Note to reviewers: I'm having trouble with the return types of the segmentation factory functions 🤷♂️
Any feedback is welcome!
cc @datumbox