-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Added missing typing annotations in datasets/_stereo_matching #6846
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.
Thanks Francois. I don't have any inline comments, but could you also make
def _read_disparity(self, file_path: str) -> Tuple: |
and all other occurrences of this more precise?
@@ -14,6 +14,9 @@ | |||
from .utils import _read_pfm, download_and_extract_archive, verify_str_arg | |||
from .vision import VisionDataset | |||
|
|||
T1 = Tuple[Image.Image, Image.Image, Optional[np.ndarray], np.ndarray] |
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.
Nice way to keep things simple
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.
Yeah. I wonder if we can make the name more expressive though. Not blocking, but T1
and T2
are rather opaque.
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.
I agree but I tried to think about a meaning naming and honestly I didn't manage to find any 😅
@@ -14,6 +14,9 @@ | |||
from .utils import _read_pfm, download_and_extract_archive, verify_str_arg | |||
from .vision import VisionDataset | |||
|
|||
T1 = Tuple[Image.Image, Image.Image, Optional[np.ndarray], np.ndarray] |
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.
Yeah. I wonder if we can make the name more expressive though. Not blocking, but T1
and T2
are rather opaque.
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.
Sorry for the late reply @frgfm.
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.
LGTM, thanks @frgfm!
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.
Lint job is failing: https://app.circleci.com/pipelines/github/pytorch/vision/22404/workflows/f6cbd044-6379-480a-bd93-2352646e4c2b/jobs/1800508. Afterwards, this should be good to merge.
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 |
#6846) Summary: * style: Added missing typing annotations in datasets/_stereo_matching * style: Specified typing * style: Specified type annotations further * style: Specified typing of __getitem__ * style: Fixed linting Reviewed By: NicolasHug Differential Revision: D42414489 fbshipit-source-id: a9127b783fcccb0c17b28487ce63fe1a50d61dcb Co-authored-by: Philip Meier <github.pmeier@posteo.de>
Following up on #2025, this PR adds missing typing annotations in models/_stereo_matching.
Any feedback is welcome!
cc @datumbox @pmeier @oke-aditya