Skip to content

Commit 394de98

Browse files
tomas1808fmassa
authored andcommitted
Fix calls to 'download_and_extract_archive()' (#1006)
Changes made in 7716aba broke calls to this method.
1 parent 8a64dbc commit 394de98

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

torchvision/datasets/caltech.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,13 @@ def download(self):
116116
download_and_extract_archive(
117117
"http://www.vision.caltech.edu/Image_Datasets/Caltech101/101_ObjectCategories.tar.gz",
118118
self.root,
119-
"101_ObjectCategories.tar.gz",
120-
"b224c7392d521a49829488ab0f1120d9")
119+
filename="101_ObjectCategories.tar.gz",
120+
md5="b224c7392d521a49829488ab0f1120d9")
121121
download_and_extract_archive(
122122
"http://www.vision.caltech.edu/Image_Datasets/Caltech101/Annotations.tar",
123123
self.root,
124-
"101_Annotations.tar",
125-
"6f83eeb1f24d99cab4eb377263132c91")
124+
filename="101_Annotations.tar",
125+
md5="6f83eeb1f24d99cab4eb377263132c91")
126126

127127
def extra_repr(self):
128128
return "Target type: {target_type}".format(**self.__dict__)
@@ -204,5 +204,5 @@ def download(self):
204204
download_and_extract_archive(
205205
"http://www.vision.caltech.edu/Image_Datasets/Caltech256/256_ObjectCategories.tar",
206206
self.root,
207-
"256_ObjectCategories.tar",
208-
"67b4f42ca05d46448c6bb8ecd2220f6d")
207+
filename="256_ObjectCategories.tar",
208+
md5="67b4f42ca05d46448c6bb8ecd2220f6d")

torchvision/datasets/cifar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def download(self):
147147
if self._check_integrity():
148148
print('Files already downloaded and verified')
149149
return
150-
download_and_extract_archive(self.url, self.root, self.filename, self.tgz_md5)
150+
download_and_extract_archive(self.url, self.root, filename=self.filename, md5=self.tgz_md5)
151151

152152
def extra_repr(self):
153153
return "Split: {}".format("Train" if self.train is True else "Test")

torchvision/datasets/omniglot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def download(self):
8888
filename = self._get_target_folder()
8989
zip_filename = filename + '.zip'
9090
url = self.download_url_prefix + '/' + zip_filename
91-
download_and_extract_archive(url, self.root, zip_filename, self.zips_md5[filename])
91+
download_and_extract_archive(url, self.root, filename=zip_filename, md5=self.zips_md5[filename])
9292

9393
def _get_target_folder(self):
9494
return 'images_background' if self.background else 'images_evaluation'

torchvision/datasets/stl10.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def download(self):
152152
if self._check_integrity():
153153
print('Files already downloaded and verified')
154154
return
155-
download_and_extract_archive(self.url, self.root, self.filename, self.tgz_md5)
155+
download_and_extract_archive(self.url, self.root, filename=self.filename, md5=self.tgz_md5)
156156

157157
def extra_repr(self):
158158
return "Split: {split}".format(**self.__dict__)

0 commit comments

Comments
 (0)