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.

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

For detailed documentation, visit https://jax-dataloader.readthedocs.io/.

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

Build documentation:

cd docs
make html

License

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

Author

Kartikey Rawat

Repository

GitHub: https://github.com/carrycooldude/JAX-Dataloader


Project Structure:

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.9.tar.gz (167.5 kB 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.9-py3-none-any.whl (45.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jax_dataloaders-0.1.9.tar.gz
  • Upload date:
  • Size: 167.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for jax_dataloaders-0.1.9.tar.gz
Algorithm Hash digest
SHA256 e78cd8cc14ec1178abbeec99654a5f395dec8e2d5900f863859303728c3b3692
MD5 3eb5d1dcdb206138d185a4129ccc7f52
BLAKE2b-256 d9190f82312fd701ef181fb3694778636ffdbdd8213bdce87ca1e923743e040c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jax_dataloaders-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 9e2225051a85e620fe19de76405c61610345a7980aa071a847dc62117718a669
MD5 cd5f4024522e931c561d36e246836965
BLAKE2b-256 5a9f9531922232cc4185743e5377635268d976887af7a2260429d2adeed5e8fb

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