Skip to content
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

Add feature to slice, subsample and split dataset #161

Merged

Conversation

deependujha
Copy link
Collaborator

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 #135 & fixes #145.

  1. Adds support to slice StreamingDataset
    Screenshot from 2024-06-05 13-20-06

  2. Adds support to Subsample StreamingDataset
    Screenshot from 2024-06-08 01-29-54

  3. Adds support to train_test_split StreamingDataset
    Screenshot from 2024-06-08 01-29-18

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 🙃

Copy link

codecov bot commented Jun 10, 2024

Codecov Report

Attention: Patch coverage is 94.09091% with 13 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@b51b597). Learn more about missing BASE report.

Additional details and impacted files
@@          Coverage Diff          @@
##             main   #161   +/-   ##
=====================================
  Coverage        ?    78%           
=====================================
  Files           ?     33           
  Lines           ?   4324           
  Branches        ?      0           
=====================================
  Hits            ?   3363           
  Misses          ?    961           
  Partials        ?      0           

src/litdata/streaming/config.py Outdated Show resolved Hide resolved
src/litdata/utilities/train_test_split.py Outdated Show resolved Hide resolved
tests/utilities/test_shuffle.py Outdated Show resolved Hide resolved
tests/utilities/test_train_test_split.py Outdated Show resolved Hide resolved
src/litdata/utilities/train_test_split.py Outdated Show resolved Hide resolved
src/litdata/utilities/train_test_split.py Outdated Show resolved Hide resolved
src/litdata/utilities/train_test_split.py Outdated Show resolved Hide resolved
src/litdata/streaming/dataset.py Outdated Show resolved Hide resolved
src/litdata/streaming/dataset.py Outdated Show resolved Hide resolved
src/litdata/streaming/dataset.py Outdated Show resolved Hide resolved
src/litdata/streaming/cache.py Outdated Show resolved Hide resolved
src/litdata/utilities/train_test_split.py Outdated Show resolved Hide resolved
src/litdata/utilities/train_test_split.py Outdated Show resolved Hide resolved
src/litdata/streaming/dataset.py Show resolved Hide resolved
src/litdata/streaming/config.py Outdated Show resolved Hide resolved
src/litdata/streaming/dataset.py Outdated Show resolved Hide resolved
src/litdata/streaming/dataset.py Outdated Show resolved Hide resolved
src/litdata/utilities/dataset_utilities.py Outdated Show resolved Hide resolved
src/litdata/utilities/dataset_utilities.py Outdated Show resolved Hide resolved
Copy link
Contributor

@lantiga lantiga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Just minor nits on my part, let’s try this out with redpajama

src/litdata/streaming/config.py Outdated Show resolved Hide resolved
src/litdata/streaming/config.py Outdated Show resolved Hide resolved
src/litdata/streaming/config.py Outdated Show resolved Hide resolved
src/litdata/streaming/dataset.py Outdated Show resolved Hide resolved
src/litdata/streaming/item_loader.py Outdated Show resolved Hide resolved
src/litdata/streaming/item_loader.py Outdated Show resolved Hide resolved
src/litdata/utilities/dataset_utilities.py Outdated Show resolved Hide resolved
src/litdata/streaming/reader.py Show resolved Hide resolved
src/litdata/utilities/dataset_utilities.py Outdated Show resolved Hide resolved
src/litdata/utilities/dataset_utilities.py Outdated Show resolved Hide resolved
deependujha and others added 23 commits June 17, 2024 05:37
Co-authored-by: Luca Antiga <luca@lightning.ai>
Co-authored-by: Luca Antiga <luca@lightning.ai>
Co-authored-by: Luca Antiga <luca@lightning.ai>
Co-authored-by: Luca Antiga <luca@lightning.ai>
Co-authored-by: Luca Antiga <luca@lightning.ai>
Copy link
Collaborator

@tchaton tchaton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome contribution. Thanks you :)

image

@tchaton tchaton merged commit 5c242b4 into Lightning-AI:main Jun 17, 2024
28 checks passed
@deependujha deependujha deleted the feat/slice-subsample-split-dataset branch June 17, 2024 09:50
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.

Support splitting datasets Subsample StreamingDataset
4 participants