Skip to main content

Custom Iterable Dataset

A Python package for wrapping iterable datasets to be used with Hugging Face's SFTTrainer. Just pass your iterable dataset to wrapper.

Installation

pip install custom_iterable_dataset

Usage

from custom_iterable_dataset import CustomIterableDataset
from torch.utils.data import IterableDataset

# Example usage
class MyIterableDataset(IterableDataset):
    def __iter__(self):
        yield {"input_ids": [1, 2, 3], "attention_mask": [1, 1, 1]}

my_dataset = MyIterableDataset()
my_dataset_len = 1000
custom_dataset = CustomIterableDataset(my_dataset,my_dataset_len)

# Pass custom_dataset to SFTTrainer

Metadata

Release files for custom-iterable-dataset 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for custom-iterable-dataset 0.1.0
File Size Uploaded
custom_iterable_dataset-0.1.0.tar.gz 7.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for custom-iterable-dataset 0.1.0
File Interpreter ABI Platform
custom_iterable_dataset-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 18.4 kB

Release files / custom_iterable_dataset-0.1.0.tar.gz

Download URL custom_iterable_dataset-0.1.0.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
010ccb540443c411ef9f0a7d5c428b049bdbfa6fe74833c117e8d72de79b0be4
BLAKE2b-256 checksum
How to use checksums
f727aa6fe43771f263e91f69f54b3d201ac6373636ab213e8ea3d60557945813
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.10.16

Release files / custom_iterable_dataset-0.1.0-py3-none-any.whl

Download URL custom_iterable_dataset-0.1.0-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d3508fbe30eab9e923df872b58ebe7e6348cfb6fbdb91a975395e4d6241e832
BLAKE2b-256 checksum
How to use checksums
100973b1ef0cb87cc6b4ae6ebfdfd031577955b5a94e7af9fb19627d04b7254c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.10.16

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page