Skip to content

Commit 29f078d

Browse files
authored
Merge branch 'main' into please_dont_modify_this_branch_unless_you_are_just_merging_with_main__
2 parents 5aa60e3 + 868a3b4 commit 29f078d

23 files changed

+41
-72
lines changed

.github/workflows/update-viablestrict.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def get_macros_and_flags():
127127
if NVCC_FLAGS is None:
128128
nvcc_flags = []
129129
else:
130-
nvcc_flags = nvcc_flags.split(" ")
130+
nvcc_flags = NVCC_FLAGS.split(" ")
131131
extra_compile_args["nvcc"] = nvcc_flags
132132

133133
if sys.platform == "win32":

torchvision/datasets/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
"QMNIST",
7373
"MNIST",
7474
"KMNIST",
75+
"MovingMNIST",
7576
"StanfordCars",
7677
"STL10",
7778
"SUN397",

torchvision/datasets/_stereo_matching.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,6 @@ def _download_dataset(self, root: Union[str, Path]) -> None:
588588
for calibration in ["perfect", "imperfect"]:
589589
scene_name = f"{split_scene}-{calibration}"
590590
scene_url = f"{base_url}/{scene_name}.zip"
591-
print(f"Downloading {scene_url}")
592591
# download the scene only if it doesn't exist
593592
if not (split_root / scene_name).exists():
594593
download_and_extract_archive(

torchvision/datasets/caltech.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ def __len__(self) -> int:
130130

131131
def download(self) -> None:
132132
if self._check_integrity():
133-
print("Files already downloaded and verified")
134133
return
135134

136135
download_and_extract_archive(
@@ -231,7 +230,6 @@ def __len__(self) -> int:
231230

232231
def download(self) -> None:
233232
if self._check_integrity():
234-
print("Files already downloaded and verified")
235233
return
236234

237235
download_and_extract_archive(

torchvision/datasets/celeba.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def __init__(
105105
if mask == slice(None): # if split == "all"
106106
self.filename = splits.index
107107
else:
108-
self.filename = [splits.index[i] for i in torch.squeeze(torch.nonzero(mask))]
108+
self.filename = [splits.index[i] for i in torch.squeeze(torch.nonzero(mask))] # type: ignore[arg-type]
109109
self.identity = identity.data[mask]
110110
self.bbox = bbox.data[mask]
111111
self.landmarks_align = landmarks_align.data[mask]
@@ -148,7 +148,6 @@ def _check_integrity(self) -> bool:
148148

149149
def download(self) -> None:
150150
if self._check_integrity():
151-
print("Files already downloaded and verified")
152151
return
153152

154153
for (file_id, md5, filename) in self.file_list:

torchvision/datasets/cifar.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ def _check_integrity(self) -> bool:
135135

136136
def download(self) -> None:
137137
if self._check_integrity():
138-
print("Files already downloaded and verified")
139138
return
140139
download_and_extract_archive(self.url, self.root, filename=self.filename, md5=self.tgz_md5)
141140

torchvision/datasets/cityscapes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def __getitem__(self, index: int) -> Tuple[Any, Any]:
192192

193193
targets.append(target)
194194

195-
target = tuple(targets) if len(targets) > 1 else targets[0]
195+
target = tuple(targets) if len(targets) > 1 else targets[0] # type: ignore[assignment]
196196

197197
if self.transforms is not None:
198198
image, target = self.transforms(image, target)

torchvision/datasets/imagenette.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,7 @@ def _check_exists(self) -> bool:
8181

8282
def _download(self):
8383
if self._check_exists():
84-
raise RuntimeError(
85-
f"The directory {self._size_root} already exists. "
86-
f"If you want to re-download or re-extract the images, delete the directory."
87-
)
84+
return
8885

8986
download_and_extract_archive(self._url, self.root, md5=self._md5)
9087

torchvision/datasets/inaturalist.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,4 +239,3 @@ def download(self) -> None:
239239
if not os.path.exists(orig_dir_name):
240240
raise RuntimeError(f"Unable to find downloaded files at {orig_dir_name}")
241241
os.rename(orig_dir_name, self.root)
242-
print(f"Dataset version '{self.version}' has been downloaded and prepared for use")

0 commit comments

Comments
 (0)