JuliaML / MLDatasets.jl

Utility package for accessing common Machine Learning datasets in Julia
https://juliaml.github.io/MLDatasets.jl/stable
MIT License
228 stars 45 forks source link

TemporalBrains dataset not working #238

Open CarloLucibello opened 1 month ago

CarloLucibello commented 1 month ago

cc @aurorarossi

julia> using MLDatasets

julia> TemporalBrains()
ERROR: SystemError: opening file "/Users/carlo/.julia/scratchspaces/124859b0-ceae-595e-8997-d05f6a7a8dfe/datadeps/TemporalBrains/LabelledTBN/labels.txt": No such file or directory
Stacktrace:
  [1] systemerror(p::String, errno::Int32; extrainfo::Nothing)
    @ Base ./error.jl:176
  [2] systemerror
    @ ./error.jl:175 [inlined]
  [3] open(fname::String; lock::Bool, read::Bool, write::Nothing, create::Nothing, truncate::Nothing, append::Nothing)
    @ Base ./iostream.jl:293
  [4] open
    @ ./iostream.jl:275 [inlined]
  [5] open(fname::String, mode::String; lock::Bool)
    @ Base ./iostream.jl:356
  [6] open
    @ ./iostream.jl:355 [inlined]
  [7] create_tbdataset(dir::String, thre::Float64)
    @ MLDatasets ~/.julia/packages/MLDatasets/rObys/src/datasets/graphs/temporalbrains.jl:30
  [8] TemporalBrains(; threshold_value::Float64, dir::Nothing)
    @ MLDatasets ~/.julia/packages/MLDatasets/rObys/src/datasets/graphs/temporalbrains.jl:75
  [9] TemporalBrains()
    @ MLDatasets ~/.julia/packages/MLDatasets/rObys/src/datasets/graphs/temporalbrains.jl:72
 [10] top-level scope
    @ REPL[4]:1
aurorarossi commented 1 month ago

I tried and it works on my computer. I think the problem might not be specific to these datasets. Could you please try with a different one? I notice that the dataset is not downloaded in the .julia/datadeps folder, but in the ./julia/scratchspaces folder.

CarloLucibello commented 1 month ago

Weird. I'm on julia v1.10.4. I tried to install just MLDatasets in a temporary environment and it still doesn't work. MNIST works instead.

aurorarossi commented 1 month ago

I tried it on 3 different machines (with Linux) also using the temporary env and it works. Are you working on Mac?

CarloLucibello commented 1 month ago

yes. Now I removed all the scratchspaces and then it worked. Maybe I previously had an interrupted download.

CarloLucibello commented 1 month ago

If a file is not found we should retry the download instead of erroring.