DataLoader for stream data (ReplayBuffer in Reinforcement Learning)

Dear Pytorch community,
Is there any way to apply DataLoader to get mini-batch on online stream data (like ReplayBuffer in Reinforcement Learning)
As I know, DataLoader initializes the whole data before train and it very inefficiently when re-initializing data every time data changes (ReplayBuffer increases or changes)

Thank you so much for your help!

GitHub - etienne87/pytorch-stream-dataloader , can you give this a try?