mosaicml-streaming
Streaming lets users create PyTorch compatible datasets that can be streamed from cloud-based object stores
What it is and what it does
StreamingDataset is a PyTorch data loader designed to efficiently fetch training data from cloud object storage on-demand, rather than downloading entire datasets upfront. It acts as a drop-in replacement for PyTorch's IterableDataset, integrating with AWS S3, Google Cloud Storage, Azure Blob Storage, OCI Object Storage, and S3-compatible services. The package handles data serialization in MDS (Mosaic Data Shard) format, CSV, TSV, or JSONL, with optional compression via zstd, Brotli, or snappy.
The core value proposition is enabling distributed multi-node training without requiring all data to be co-located with compute. It guarantees deterministic sample ordering across any number of GPUs, nodes, or workers—a feature that aids reproducibility and debugging. The package supports seamless mixing of multiple datasets via the Stream abstraction, allowing proportional or absolute sampling strategies. It is built for large-scale model training workflows where data volume and cloud infrastructure costs are primary concerns.
Use it for:
- Train vision models on large image datasets stored in S3 or GCS without local disk staging.
- Stream multimodal data (text + images, video + captions) from cloud storage for foundation model pretraining.
- Mix multiple datasets on-the-fly during training with deterministic reproducibility across training runs.
- Distribute training across multiple nodes where each worker streams only the samples it needs, reducing network and storage bottlenecks.
- Convert and persist raw datasets into sharded MDS format for efficient repeated training runs.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Streams large training datasets from cloud storage (AWS S3, GCS, Azure, OCI) as a PyTorch-compatible IterableDataset, handling images, text, video, and multimodal data with built-in compression and deterministic shuffling.
Yes, if you train on large datasets in cloud storage and need deterministic, distributed data loading. The active maintenance, low install friction, and PyTorch integration make it a solid choice. However, verify the license terms first (currently marked unclear in metadata), and confirm that the 18 runtime dependencies align with your environment. Not necessary if your data fits locally or if you use a different data pipeline framework.
Install
mosaicml-streaming on PyPI
pip
pip install mosaicml-streaminguv
uv add mosaicml-streamingpoetry
poetry add mosaicml-streamingInstalling mosaicml-streaming
Before you install
Low friction: pure Python wheel with no compiled dependencies. Active maintenance (last commit 2026-06-25, 1545 stars). However, 18 runtime dependencies including torch, torchvision, and transformers mean a substantial environment footprint if not already present.
License in practice
License treatment is unclear—no SPDX identifier or raw license text in metadata. Verify the actual license terms in the repository before adopting in proprietary or restricted-license contexts.
Quickstart
pip install mosaicml-streaming
from streaming import StreamingDataset
from torch.utils.data import DataLoader
dataset = StreamingDataset(local='/tmp/cache', remote='s3://bucket/data', shuffle=True)
loader = DataLoader(dataset, batch_size=32)
for batch in loader:
pass # train
Requires Python >=3.10 and torch installed. Cloud credentials (AWS, GCS, Azure, OCI) must be configured in your environment for remote access.
Verify before relying
- Actual license terms and restrictions (metadata shows 'unclear' treatment)
- Whether all 18 runtime dependencies are truly required or optional/conditional
- Performance characteristics and throughput guarantees for different cloud providers
- Specific dataset mixing proportions and sampling behavior in production scenarios
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 18 — boto3, Brotli, google-cloud-storage, matplotlib, numpy, paramiko, python-snappy, torch, torchvision, tqdm, transformers, xxhash, zstd, oci, azure-storage-blob, azure-storage-file-datalake, azure-identity, catalogue |
| Maintenance | actively maintained — 395 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 928,673/month — #4,707 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: mosaicml_streaming-0.13.0-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
litdataLitData optimizes and streams large datasets…
permissive · top 15,000 on PyPI
webdatasetWebDataset reads and streams large-scale…
permissive · top 5,000 on PyPI
datasetsLoads and preprocesses datasets from the…
permissive · top 1,000 on PyPI
smart-openProvides a unified, open()-compatible Python…
permissive · top 1,000 on PyPI
petastormPetastorm enables direct training of deep…
permissive · top 15,000 on PyPI
s3torchconnectorProvides PyTorch dataset primitives and…
permissive · top 5,000 on PyPI
ideniden manages machine learning datasets…
permissive · top 15,000 on PyPI
deeplakeDeep Lake is a serverless database for storing,…
unclear · top 15,000 on PyPI
clip-anytorchLoads and runs OpenAI's CLIP model to encode…
unclear · top 15,000 on PyPI
rerun-sdkRecords and streams data like images, tensors,…
permissive · top 5,000 on PyPI