write datasets in a JLD2 or Arrow format for faster read

Open
#125 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
julia

Research direction

Start by locating dataset constructors such as MNIST and their current dataset creation paths; inspect how FileIO.load and FileIO.save could support a processed/dataset.jld2 cache. Resolve the JLD2-versus-Arrow choice and define the cache behavior, then verify that repeated construction loads the stored dataset instead of recreating it.

Written by the indexing model from the issue text.

Description

gsoc

We could have a "processed" folder in each dataset folder where we write the dataset object the first time we create it. In the following creations, e.g. d = MNIST() we just load the JLD2 file.

Example:

function MNIST(...)
    dataset_dir = ...
    processed_file = joinpath(dataset_dir, "processed", "dataset.jld2") 
    if isfile(processed_file) 
        return FileIO.load(processed_file, "dataset")
    end 

    mnist = ...
    if isfile(processed_file) 
        FileIO.save(processed_file, Dict("dataset" => mnist))
    end 
    return mnist
end
Dominant language
Julia
Stars
239
Forks
52
Avg merge
4h 23m
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from JuliaML/MLDatasets.jl

All issues in JuliaML/MLDatasets.jl

Similar issues

More Julia issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.