Commit 0fe0305a authored by PG_LoLo's avatar PG_LoLo
Browse files

YESNO dataset download fix

parent cedeaf34
...@@ -101,9 +101,7 @@ class YESNO(data.Dataset): ...@@ -101,9 +101,7 @@ class YESNO(data.Dataset):
filename = url.rpartition('/')[2] filename = url.rpartition('/')[2]
file_path = os.path.join(self.root, self.raw_folder, filename) file_path = os.path.join(self.root, self.raw_folder, filename)
if not os.path.isfile(file_path): if not os.path.isfile(file_path):
data = urllib.request.urlopen(url) urllib.request.urlretrieve(url, file_path)
with open(file_path, 'wb') as f:
f.write(data.read())
else: else:
print("Tar file already downloaded") print("Tar file already downloaded")
if not os.path.exists(dset_abs_path): if not os.path.exists(dset_abs_path):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment