diff --git a/torchvision/datasets/caltech.py b/torchvision/datasets/caltech.py index fe4f0fad208..b152c425c77 100644 --- a/torchvision/datasets/caltech.py +++ b/torchvision/datasets/caltech.py @@ -130,7 +130,6 @@ def __len__(self) -> int: def download(self) -> None: if self._check_integrity(): - print("Files already downloaded and verified") return download_and_extract_archive( @@ -231,7 +230,6 @@ def __len__(self) -> int: def download(self) -> None: if self._check_integrity(): - print("Files already downloaded and verified") return download_and_extract_archive( diff --git a/torchvision/datasets/celeba.py b/torchvision/datasets/celeba.py index 147597d3ab3..7ff0595166b 100644 --- a/torchvision/datasets/celeba.py +++ b/torchvision/datasets/celeba.py @@ -148,7 +148,6 @@ def _check_integrity(self) -> bool: def download(self) -> None: if self._check_integrity(): - print("Files already downloaded and verified") return for (file_id, md5, filename) in self.file_list: diff --git a/torchvision/datasets/cifar.py b/torchvision/datasets/cifar.py index 1637670ab91..0f425d76c57 100644 --- a/torchvision/datasets/cifar.py +++ b/torchvision/datasets/cifar.py @@ -135,7 +135,6 @@ def _check_integrity(self) -> bool: def download(self) -> None: if self._check_integrity(): - print("Files already downloaded and verified") return download_and_extract_archive(self.url, self.root, filename=self.filename, md5=self.tgz_md5) diff --git a/torchvision/datasets/imagenette.py b/torchvision/datasets/imagenette.py index 05da537891b..0b27f3b25e5 100644 --- a/torchvision/datasets/imagenette.py +++ b/torchvision/datasets/imagenette.py @@ -81,10 +81,7 @@ def _check_exists(self) -> bool: def _download(self): if self._check_exists(): - raise RuntimeError( - f"The directory {self._size_root} already exists. " - f"If you want to re-download or re-extract the images, delete the directory." - ) + return download_and_extract_archive(self._url, self.root, md5=self._md5) diff --git a/torchvision/datasets/lfw.py b/torchvision/datasets/lfw.py index 69f1edaf72f..18374fc3c9b 100644 --- a/torchvision/datasets/lfw.py +++ b/torchvision/datasets/lfw.py @@ -74,7 +74,6 @@ def _check_integrity(self) -> bool: def download(self) -> None: if self._check_integrity(): - print("Files already downloaded and verified") return url = f"{self.download_url_prefix}{self.filename}" download_and_extract_archive(url, self.root, filename=self.filename, md5=self.md5) diff --git a/torchvision/datasets/omniglot.py b/torchvision/datasets/omniglot.py index c02cf91234a..c3434a72456 100644 --- a/torchvision/datasets/omniglot.py +++ b/torchvision/datasets/omniglot.py @@ -91,7 +91,6 @@ def _check_integrity(self) -> bool: def download(self) -> None: if self._check_integrity(): - print("Files already downloaded and verified") return filename = self._get_target_folder() diff --git a/torchvision/datasets/sbu.py b/torchvision/datasets/sbu.py index 3c349370a12..b5f46101e07 100644 --- a/torchvision/datasets/sbu.py +++ b/torchvision/datasets/sbu.py @@ -93,7 +93,6 @@ def download(self) -> None: """Download and extract the tarball, and download each individual photo.""" if self._check_integrity(): - print("Files already downloaded and verified") return download_and_extract_archive(self.url, self.root, self.root, self.filename, self.md5_checksum) diff --git a/torchvision/datasets/semeion.py b/torchvision/datasets/semeion.py index d0344c74241..71485b14dcf 100644 --- a/torchvision/datasets/semeion.py +++ b/torchvision/datasets/semeion.py @@ -85,7 +85,6 @@ def _check_integrity(self) -> bool: def download(self) -> None: if self._check_integrity(): - print("Files already downloaded and verified") return root = self.root diff --git a/torchvision/datasets/stl10.py b/torchvision/datasets/stl10.py index 90ff41738eb..39c058e497d 100644 --- a/torchvision/datasets/stl10.py +++ b/torchvision/datasets/stl10.py @@ -154,7 +154,6 @@ def _check_integrity(self) -> bool: def download(self) -> None: if self._check_integrity(): - print("Files already downloaded and verified") return download_and_extract_archive(self.url, self.root, filename=self.filename, md5=self.tgz_md5) self._check_integrity() diff --git a/torchvision/datasets/widerface.py b/torchvision/datasets/widerface.py index 71f4ce313c3..b451ebe25b9 100644 --- a/torchvision/datasets/widerface.py +++ b/torchvision/datasets/widerface.py @@ -182,7 +182,6 @@ def _check_integrity(self) -> bool: def download(self) -> None: if self._check_integrity(): - print("Files already downloaded and verified") return # download and extract image data