Lightning-AI / Lightning-AI/litData

Support Cycling a CombinedStreamingDataset

Open
#658 3 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
614
Forks
106
Avg merge
15h 8m
Merged PRs (30d)
22

Description

## 🚀 Feature

The ability to provide length as an input argument to the CombinedStreamingDataset such that the epoch length is dissociated from the number of samples in the dataset. Same as ParallelStreamingDataset.

### Motivation

I want to create a CombinedStreamingDataset that is the weighted combination of StreamingDatasets but be able to specify the number of training steps/cycle the CombinedStreamingDataset arbitrarily. As discussed with @tchaton.

Related to #524

### Alternatives

Not sure if this would work but conceptually one workaround might be to wrap the CombinedStreamingDataset with the ParallelStreamingDataset? e.g.
```
ds1 = StreamingDataset(...)
ds2 = StreamingDataset(...)
cds = CombinedStreamingDataset([ds1, ds2], weights)
pds = ParallelStreamingDataset([cds], length=100)
```

Contributor guide

Open the contributing guide

Research direction

Start by reading the CombinedStreamingDataset and ParallelStreamingDataset implementations, then review the context in related issue #524. Determine how ParallelStreamingDataset accepts length and how cycling should affect weighted combinations; done means CombinedStreamingDataset can accept an arbitrary length and cycle for the requested training steps.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-engineering, stream-processing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.