Dagster-HF-Datasets
Overview
Dagster-HF-Datasets integrates Hugging Face datasets with Dagster for building reproducible, observable data pipelines. Load datasets directly as Dagster assets, apply transformations, and publish results back to the Hub.
Features
- Hugging Face dataset assets — Load any HF dataset as a Dagster asset with automatic metadata.
- Streaming support — Efficiently handle large datasets with runtime-only streaming mode.
- Parquet persistence — Auto-save datasets to disk for caching and versioning.
- Metadata & lineage — Rich metadata for observability and data lineage tracking.
- Multi-asset pipelines — Create split-aware assets from datasets with multiple splits.
- Hub publishing — Push processed datasets back to the Hugging Face Hub with dataset cards.
Installation
pip install dagster-hf-datasets
Development Install:
git clone https://github.com/dagster-io/community-integrations.git
cd libraries/dagster-hf-datasets
pip install -e .
Examples
Basic Asset Pipeline
Get started with a simple example of materializing a Hugging Face dataset as a Dagster asset:
See examples/basic_asset_pipeline.py
- Dataset materialization with
hf_dataset_asset - Parquet persistence via
HFParquetIOManager - Automatic metadata enrichment
- Hugging Face Hub observability
Multi-Asset Streaming Pipeline
Process large datasets efficiently with runtime-only streaming ingestion:
See examples/multi_asset_pipeline.py
- Streaming dataset loading with
load_dataset(..., streaming=True) - Deterministic sampling of IterableDatasets
- Metadata extraction from streaming sources
- Conversion to persistent materialized artifacts
Complete Dataset Pipeline
Build production-grade data pipelines with dataset cleaning, transformation and publishing:
See examples/multi_asset_pipeline.py
- Deduplication and filtering of raw data
- Text normalization and formatting
- Multi-step lineage-aware transformations
- Hugging Face Hub dataset publishing
Documentation
- Usage Guide — Quick start, configuration, publishing datasets to Hugging Face Hub, and metadata/lineage tracking
- API Reference — Complete API documentation for
HuggingFaceResource, asset decorators, and the IO manager
Resources
-
Release Article — Deep dive into the motivation, architecture, runtime lifecycle and patterns behind
dagster-hf-datasets. -
Official Dagster Documentation — Installation instructions, features and end-to-end usage guide.
-
Examples on Hugging Face — Explore 10+ curated example pipelines.
Development
Test
make test
Build
make build
Release files for dagster-hf-datasets 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dagster_hf_datasets-0.0.2.tar.gz | 14.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dagster_hf_datasets-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.6 kB
Release files / dagster_hf_datasets-0.0.2.tar.gz
| Download URL | dagster_hf_datasets-0.0.2.tar.gz |
|---|---|
| Size | 14.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8de53c460f1bd2f280625a28d748262fa3f48da62fb5f736f80f99492f459f63
|
|
BLAKE2b-256 checksum How to use checksums |
f4f26f8b4ded92cbfc69f0b97465190e329d390d0c0b720d7eb1ca67dc236ea9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / dagster_hf_datasets-0.0.2-py3-none-any.whl
| Download URL | dagster_hf_datasets-0.0.2-py3-none-any.whl |
|---|---|
| Size | 17.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7235eb45a5c275f6a58c2d822befe9c27caf766cc00931ad26fc0439f93cd0a5
|
|
BLAKE2b-256 checksum How to use checksums |
3c265d562f9ca7228ed68053d4e8fb712fdb771cf54063a4a0a23f7dfcb94007
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|