Skip to main content

Dagster-HF-Datasets

Dagster-HF-Datasets Logo

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


Development

Test

make test

Build

make build

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dagster_hf_datasets-0.0.2.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dagster_hf_datasets-0.0.2-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file dagster_hf_datasets-0.0.2.tar.gz.

File metadata

  • Download URL: dagster_hf_datasets-0.0.2.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for dagster_hf_datasets-0.0.2.tar.gz
Algorithm Hash digest
SHA256 8de53c460f1bd2f280625a28d748262fa3f48da62fb5f736f80f99492f459f63
MD5 aca0007a3812391849672927e53db405
BLAKE2b-256 f4f26f8b4ded92cbfc69f0b97465190e329d390d0c0b720d7eb1ca67dc236ea9

See more details on using hashes here.

File details

Details for the file dagster_hf_datasets-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: dagster_hf_datasets-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for dagster_hf_datasets-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7235eb45a5c275f6a58c2d822befe9c27caf766cc00931ad26fc0439f93cd0a5
MD5 5f2918b3c34c6e2af3e87db7ae4533d4
BLAKE2b-256 3c265d562f9ca7228ed68053d4e8fb712fdb771cf54063a4a0a23f7dfcb94007

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page