Skip to main content

A high-performance data loading library for JAX

Project description

JAX DataLoader

A high-performance data loading library for JAX applications.

PyPI version
📦 PyPI: jax-dataloaders
📘 Documentation: https://carrycooldude.github.io/JAX-Dataloader/
🌐 Live Website (Netlify): https://jax-dataloader.netlify.app/
🔗 GitHub Repo: https://github.com/carrycooldude/JAX-Dataloader


Features

  • Efficient data loading with memory management
  • Support for CSV, JSON, and image data
  • Data augmentation and preprocessing
  • Progress tracking
  • Caching
  • Multi-GPU support
  • Memory monitoring and auto-tuning

Installation

pip install jax-dataloaders

Usage

Basic Usage

from jax_dataloader import DataLoader, DataLoaderConfig

# Create configuration
config = DataLoaderConfig(
    batch_size=32,
    shuffle=True,
    loader_type="csv",
    data_path="data.csv"
)

# Create data loader
dataloader = DataLoader(config)

# Iterate over batches
for batch_data, batch_labels in dataloader:
    print(f"Batch shape: {batch_data.shape}")

Advanced Usage

from jax_dataloader import DataLoader, DataLoaderConfig
from jax_dataloader.transform import Transform

# Create transform
transform = Transform()
transform.add(lambda x: x * 2)  # Example transform

# Create configuration
config = DataLoaderConfig(
    batch_size=32,
    shuffle=True,
    loader_type="json",
    data_path="data.json",
    transform=transform,
    num_workers=4,
    prefetch_factor=2
)

# Create data loader
dataloader = DataLoader(config)

# Iterate over batches
for batch_data, batch_labels in dataloader:
    print(f"Batch shape: {batch_data.shape}")

Documentation

📘 Full documentation available at:
https://carrycooldude.github.io/JAX-Dataloader/


Development

Setup

  1. Clone the repository:
git clone https://github.com/carrycooldude/JAX-Dataloader.git
cd JAX-Dataloader
  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install development dependencies:
pip install -e ".[dev]"

Testing

Run tests:

pytest

Building Documentation

cd docs
make html

License

This project is licensed under the MIT License — see the LICENSE file for details.


Author

Kartikey Rawat


Project Links


Project details


Download files

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

Source Distribution

jax_dataloaders-0.1.10.tar.gz (2.6 MB view details)

Uploaded Source

Built Distribution

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

jax_dataloaders-0.1.10-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file jax_dataloaders-0.1.10.tar.gz.

File metadata

  • Download URL: jax_dataloaders-0.1.10.tar.gz
  • Upload date:
  • Size: 2.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.19

File hashes

Hashes for jax_dataloaders-0.1.10.tar.gz
Algorithm Hash digest
SHA256 eaa617f8ce8f12d134436ee78742755715b6efd448c4826710e59a343d8f4721
MD5 3b19995f9eb272302fe8eef3b4460cc9
BLAKE2b-256 bc225ec34de7143614aecaf7a92eebb416001bf194c1f1bb73aebf79cc4114db

See more details on using hashes here.

File details

Details for the file jax_dataloaders-0.1.10-py3-none-any.whl.

File metadata

File hashes

Hashes for jax_dataloaders-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 d8bbbb733a8eb36b7dfc68e5d83e3e247c2d8218997326bd904acda3a477b094
MD5 2512c18a3d996b521e4bb02e045611ba
BLAKE2b-256 538a59e4ff2e6a2f7518fef2566ab73762211718f386ab2cb26c593359d15749

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 Pingdom Monitoring Sentry Error logging StatusPage Status page