简体中文 | English
A Cargo workspace for building and consuming Rust dataset loaders. This workspace splits the architecture layer and the built-in dataset implementations into two crates. You depend only on what you need.
| Crate | Path | What it provides |
|---|---|---|
dataset-core |
crates/dataset-core |
The Dataset<T, E> type (thread-safe, lazy, cached) and the optional utils module (download, unzip, gunzip, tar / tar.gz extraction, SHA-256, etc.) |
dataset-ml |
crates/dataset-ml |
Ready-to-use loaders for classic ML datasets (Iris, Adult, Titanic, Covtype, Abalone, SMS Spam, 20 Newsgroups, …), built on dataset-core
|
dataset-core (workspace root)
├── crates/
│ ├── dataset-core/ architecture: Dataset<T, E>, utils, error
│ └── dataset-ml/ implementations: Iris, Titanic, Wine Quality, ...
├── Cargo.toml workspace manifest
└── README.md this file
-
Just need lazy caching for your own data? Depend on
dataset-core. -
Want ready-to-use loaders for the classic ML datasets? Depend on
dataset-ml. It includesdataset-coreautomatically.
# Minimal: just Dataset<T, E>
[dependencies]
dataset-core = "0.6"
# Need download / unzip / gunzip / untar / SHA-256 helpers too
[dependencies]
dataset-core = { version = "0.6", features = ["utils"] }
# Built-in ML datasets (Iris, Titanic, ...) plus the preprocessing helpers
[dependencies]
dataset-ml = "0.5"
# Only the loaders, without the preprocessing helpers
[dependencies]
dataset-ml = { version = "0.5", default-features = false, features = ["dataset"] }This workspace uses Rust edition 2024, MSRV 1.88.0.
# Build everything
cargo build --workspace --all-features
# Check a single crate
cargo check -p dataset-core
cargo check -p dataset-core --features utils
cargo check -p dataset-ml
# Run tests (most dataset-ml tests perform real network downloads)
cargo test -p dataset-core --features utils
cargo test -p dataset-ml
cargo test --workspace --all-features
# Docs
cargo doc --workspace --all-features --no-deps --open
# Lint & format
cargo clippy --workspace --all-features --all-targets -- -D warnings
cargo fmt --allEach crate has its own changelog:
This project uses the MIT License. See LICENSE for details.
Review the Code of Conduct before contributing.
Contributions are welcome. Open an issue or a pull request on SomeB1oody/dataset-core.
SomeB1oody: stanyin64@gmail.com
