mlverse / torchvision

R interface to torchvision
https://torchvision.mlverse.org
Other
62 stars 14 forks source link

zipped datasets is not deleted after unzipping #99

Open sebffischer opened 1 year ago

sebffischer commented 1 year ago

Below, the file tiny-imagenet-200.zip should be deleted I believe after it is unzipped.

dir = tempfile()

torchvision::tiny_imagenet_dataset(dir, download = TRUE)
#> Downloding tiny imagenet dataset!
#> Download complete. Now unzipping.
#> Done!
#> <tiny_imagenet>
#>   Inherits from: <image_folder>
#>   Public:
#>     .find_classes: function (dir) 
#>     .getitem: function (index) 
#>     .length: function () 
#>     class_to_idx: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 ...
#>     classes: n01443537 n01629819 n01641577 n01644900 n01698640 n01742 ...
#>     clone: function (deep = FALSE) 
#>     download: function () 
#>     extensions: jpg jpeg png
#>     imgs: list
#>     initialize: function (root, split = "train", download = FALSE, ...) 
#>     loader: function (path) 
#>     root: /tmp/Rtmp2y87cF/file1bf355f53a64d/tiny-imagenet-200/train
#>     root_path: /tmp/Rtmp2y87cF/file1bf355f53a64d
#>     samples: list
#>     tar_name: tiny-imagenet-200
#>     target_transform: NULL
#>     targets: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1  ...
#>     transform: NULL
#>     url: http://cs231n.stanford.edu/tiny-imagenet-200.zip

list.files(dir)
#> [1] "tiny-imagenet-200"     "tiny-imagenet-200.zip"

Created on 2023-07-14 with reprex v2.0.2

dfalbel commented 1 year ago

Thanks for reporting! Yes, it should be deleted.