Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't load data from an example from a book #69

Open
mytarmail opened this issue Aug 17, 2023 · 1 comment
Open

I can't load data from an example from a book #69

mytarmail opened this issue Aug 17, 2023 · 1 comment

Comments

@mytarmail
Copy link

Hi !
i try to run this dataset but can not
https://skeydan.github.io/Deep-Learning-and-Scientific-Computing-with-R-torch/audio_classification.html

library(torch)
 library(torchaudio)
 library(luz)
 
 ds <- speechcommand_dataset(
   root = "~/.torch-datasets", 
   url = "speech_commands_v0.01",
   download = TRUE
 )


Error in if (!tools::md5sum(destfile) == checksum) runtime_error(glue::glue("MD5 sums are not identical for file: {destfile}.")) : 
  missing value where TRUE/FALSE needed
In addition: Warning messages:
1: In utils::download.file(url = url, destfile = destfile) :
  URL https://storage.googleapis.com/download.tensorflow.org/data/speech_commands_v0.01.tar.gz: cannot open destfile '~/.torch-datasets/speech_commands_v0.01.tar.gz', reason 'No such file or directory'
2: In utils::download.file(url = url, destfile = destfile) :
  download had nonzero exit status
sessionInfo()
R version 4.3.0 (2023-04-21 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default
   

time zone: Europe/Kiev
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] torchdatasets_0.3.0 torchaudio_0.3.1    luz_0.4.0           torch_0.11.0  
@dfalbel
Copy link
Member

dfalbel commented Aug 17, 2023

Hi @mytarmail

Thanks for reporting, this is a bug in our implementation which fails if the root directory doesn't exist.
A workaround is to, create the directory first, and then pass to the root argument.

library(torch)
library(torchaudio)
library(luz)

dir <- fs::dir_create("~/torch-datasets")
ds <- speechcommand_dataset(
  root = dir, 
  url = "speech_commands_v0.01",
  download = TRUE
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants