Skip to content

Commit

Permalink
[fbsync] Fix Mypy (#8555)
Browse files Browse the repository at this point in the history
Reviewed By: vmoens

Differential Revision: D60596232

fbshipit-source-id: eeae2f7b705d64ce62bcca542d1bcf746ae36fad
  • Loading branch information
NicolasHug authored and facebook-github-bot committed Aug 2, 2024
1 parent a8fa77e commit 4065dac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion torchvision/datasets/kinetics.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from .vision import VisionDataset


def _dl_wrap(tarpath: str, videopath: str, line: str) -> None:
def _dl_wrap(tarpath: Union[str, Path], videopath: Union[str, Path], line: str) -> None:
download_and_extract_archive(line, tarpath, videopath)


Expand Down
4 changes: 2 additions & 2 deletions torchvision/transforms/_presets.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
This file is part of the private API. Please do not use directly these classes as they will be modified on
future versions without warning. The classes should be accessed only via the transforms argument of Weights.
"""
from typing import Optional, Tuple
from typing import Optional, Tuple, Union

import torch
from torch import nn, Tensor
Expand Down Expand Up @@ -87,7 +87,7 @@ def __init__(
self,
*,
crop_size: Tuple[int, int],
resize_size: Tuple[int, int],
resize_size: Union[Tuple[int], Tuple[int, int]],
mean: Tuple[float, ...] = (0.43216, 0.394666, 0.37645),
std: Tuple[float, ...] = (0.22803, 0.22145, 0.216989),
interpolation: InterpolationMode = InterpolationMode.BILINEAR,
Expand Down

0 comments on commit 4065dac

Please sign in to comment.