Skip to content

feat: add support to stream multiple optimized datasets using StreamingDataset #680

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

deependujha
Copy link
Collaborator

@deependujha deependujha commented Aug 8, 2025

Before submitting
  • Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?

What does this PR do?

Fixes # (issue).

This PR introduces a new feature to the StreamingDataset class, enabling it to accept multiple input_dir paths and combine their index.json files while preserving their respective remote path sources. This allows streaming from multiple buckets simultaneously without the need to copy or merge files, resulting in significant speed improvements.

testing code

import litdata as ld

optimized_datasets = ["s3://bucket1/ds1", "s3://bucket2/ds2", "s3://bucket3/ds8"]

ds = ld.StreamingDataset(optimized_datasets)

dataloader = ld.StreamingDataloader(ds, batch_size = 4)

for batch in dataloader:
    ...

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in GitHub issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@deependujha deependujha marked this pull request as draft August 8, 2025 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant