FluxML / FluxML/FastAI.jl

the dataset is deleted right after download in Windows10

Open
#270 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Julia
Stars
592
Forks
49
PR merge metrics
No merged PRs in 30d

Description

### Package Version

0.5.0

### Julia Version

1.8.3

### OS / Environment

Windows10

### Describe the bug

I just run the following code to download the coco_sample dataset: `FastAI.load(datasets()["coco_sample"])`. The download is succesful. After the download 7zip is being called to unpack the archive. After the unzipping the following error occurs.
It looks like the script tries to delete the folder it just created, `fastai-coco_cample`.
This happens with all the datasets.
```
ERROR: LoadError: IOError: rm("D:\\z_installed_programs\\julia-depot\\datadeps\\fastai-coco_sample"): resource busy or locked (EBUSY)
```

Note that I have the julia's DEPOT_PATH environment variable set to `D:\\z_installed_programs\\julia-depot`, instead of the default home directory of the user.

### Steps to Reproduce

```
using FastAI
FastAI.load(datasets()["coco_sample"])
```

### Expected Results

get the coco sample dataset on the PC

### Observed Results

the archive of the coco sample is downloaded, the archive is unzipped, then the error occurs and then the `fastai-coco_cample` folder containing the archive and the unzipped data is deleted.

### Relevant log output

```
ERROR: LoadError: IOError: rm("D:\\z_installed_programs\\julia-depot\\datadeps\\fastai-coco_sample"): resource busy or locked (EBUSY)
Stacktrace:
[1] uv_error
@ .\libuv.jl:97 [inlined]
[2] rm(path::String; force::Bool, recursive::Bool)
@ Base.Filesystem .\file.jl:306
[3] checkfor_mv_cp_cptree(src::String, dst::String, txt::String; force::Bool)
@ Base.Filesystem .\file.jl:330
[4] #mv#15
@ .\file.jl:425 [inlined]
[5] (::FastAI.Datasets.var"#10#11")(f::String)
@ FastAI.Datasets D:\z_installed_programs\julia-depot\packages\FastAI\as9UG\src\datasets\fastaidatasets.jl:261
[6] #16
@ D:\z_installed_programs\julia-depot\packages\DataDeps\ae6dT\src\resolution_automatic.jl:122 [inlined]
[7] cd(f::DataDeps.var"#16#17"{FastAI.Datasets.var"#10#11", String}, dir::String)
@ Base.Filesystem .\file.jl:101
[8] run_post_fetch(post_fetch_method::FastAI.Datasets.var"#10#11", fetched_path::String)
@ DataDeps D:\z_installed_programs\julia-depot\packages\DataDeps\ae6dT\src\resolution_automatic.jl:119
[9] download(datadep::DataDeps.DataDep{String, String, typeof(DataDeps.fetch_default), FastAI.Datasets.var"#10#11"}, localdir::String; remotepath::String, i_accept_the_terms_of_use::Nothing, skip_checksum::Bool)
@ DataDeps D:\z_installed_programs\julia-depot\packages\DataDeps\ae6dT\src\resolution_automatic.jl:84
[10] download
@ D:\z_installed_programs\julia-depot\packages\DataDeps\ae6dT\src\resolution_automatic.jl:63 [inlined]
[11] handle_missing
@ D:\z_installed_programs\julia-depot\packages\DataDeps\ae6dT\src\resolution_automatic.jl:10 [inlined]
[12] _resolve
@ D:\z_installed_programs\julia-depot\packages\DataDeps\ae6dT\src\resolution.jl:83 [inlined]
[13] resolve(datadep::DataDeps.DataDep{String, String, typeof(DataDeps.fetch_default), FastAI.Datasets.var"#10#11"}, inner_filepath::String, calling_filepath::String)
@ DataDeps D:\z_installed_programs\julia-depot\packages\DataDeps\ae6dT\src\resolution.jl:29
[14] resolve(datadep_name::String, inner_filepath::String, calling_filepath::String)
@ DataDeps D:\z_installed_programs\julia-depot\packages\DataDeps\ae6dT\src\resolution.jl:54
[15] resolve
@ D:\z_installed_programs\julia-depot\packages\DataDeps\ae6dT\src\resolution.jl:73 [inlined]
[16] makeavailable
@ D:\z_installed_programs\julia-depot\packages\FastAI\as9UG\src\datasets\loaders.jl:46 [inlined]
[17] loaddata(loader::FastAI.Datasets.DataDepLoader)
@ FastAI.Datasets D:\z_installed_programs\julia-depot\packages\FastAI\as9UG\src\datasets\loaders.jl:50
[18] (::FastAI.Registries.var"#8#13")(row::NamedTuple{(:id, :description, :size, :tags, :package, :downloaded, :loader), Tuple{String, Union{Missing, String}, Union{Missing, String}, Vector{String}, Module, Bool, FastAI.Datasets.DatasetLoader}})
@ FastAI.Registries D:\z_installed_programs\julia-depot\packages\FastAI\as9UG\src\Registries\datasets.jl:38
[19] load(entry::FeatureRegistries.RegistryEntry; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ FeatureRegistries D:\z_installed_programs\julia-depot\packages\FeatureRegistries\FBMLI\src\registry.jl:135
[20] load
@ D:\z_installed_programs\julia-depot\packages\FeatureRegistries\FBMLI\src\registry.jl:135 [inlined]
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with FastAI.load(datasets()["coco_sample"]) on Windows 10 using a custom DEPOT_PATH. Start at src/datasets/fastaidatasets.jl around line 261 and follow the DataDeps post-fetch path shown in the stack trace. Done means the dataset directory is retained after extraction and the dataset loads successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.