in neuralcompression/data/_clic_2020_image.py [0:0]
def download(self):
extract_root = str(self.root)
if self.split == "test":
extract_root = self.root.joinpath("test")
torchvision.datasets.utils.download_and_extract_archive(
**self.splits[self.split],
download_root=str(self.root),
extract_root=extract_root,
)
if self.split == "val":
os.rename(self.root.joinpath("valid"), self.root.joinpath(self.split))
if self.split in {"train", "val"}:
shutil.rmtree(self.root.joinpath("__MACOSX"))
else:
shutil.rmtree(self.root.joinpath(self.split).joinpath("__MACOSX"))