Skip to main content

A library for loading large Parquet files as an IterableDataset in PyTorch using Dask.

Project description

PyTorch Parquet Loader

pytorch_parquet_loader is a Python library for loading large Parquet files as PyTorch DataLoader objects, optimized for memory efficiency using Dask.

Features

  • Efficiently loads large Parquet files into PyTorch DataLoader.
  • Automatically handles object (string) and date32[day] data types by encoding them to numeric values.
  • Compatible with both numeric and categorical data in a format compatible with PyTorch.

Installation

Prerequisites

Ensure you have Python 3.9 or higher installed.

Install the Library

To install the package from PyPI:

pip install pytorch_parquet_loader

Testing

To run the test, you can the below script:

from pytorch_parquet_loader import load_parquet_as_dataloader

# Path to your Parquet file
file_path = "path/to/your_large_file.parquet"

# Load Parquet file as a DataLoader
dataloader = load_parquet_as_dataloader(file_path, batch_size=32, num_workers=0)

# Iterate over the DataLoader
for batch in dataloader:
    print(batch)  # Each batch is a PyTorch tensor

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

pytorch_parquet_loader-0.1.1.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

pytorch_parquet_loader-0.1.1-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file pytorch_parquet_loader-0.1.1.tar.gz.

File metadata

  • Download URL: pytorch_parquet_loader-0.1.1.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for pytorch_parquet_loader-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b115e21bc0392f93eb54c1fc3131d06c89df36196dac03ea68351a19c80127e9
MD5 f34ab302c666104d1e75d673846c1d62
BLAKE2b-256 b7cbcf4ff82abe1520b99a5cf7612221a6b5761954bb69ecf446fe96489385ad

See more details on using hashes here.

File details

Details for the file pytorch_parquet_loader-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pytorch_parquet_loader-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7dd7dbeaef6622d5e04ee3dc0d6d2f6f879db3bbddd0896b8c3074ee13addcf6
MD5 4d3c1ca53ce0fadf9dfaaa2167442f03
BLAKE2b-256 5cef51029f517040053fca2b462a2af0a89d1e654289b21828db696abd635d45

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