Should these batches be returned sequentially or are you expecting to get a batch for each sequence length in a single step?
In the latter case, you could wrap each Dataset for a specific sequence length in one MainDataset, which could return a frame for each sequence length. The DataLoader would then create the batches.