No.
The typical thing people are doing is to use a conventional dataset that will load data in the __getitem__ method.
Look at TorchVision’s DatasetFolder-dataset (used via ImageFolder for Imagenet) for inspiration.
The deeper reason is that suffling requires, by definition, “random access” of some sort. That’s what classic datasets are for.
Best regards
Thomas