According to the spec of torch.utils.data.Dataset:

An abstract class representing a Dataset.


All other datasets should subclass it. All subclasses should override
__len__, that provides the size of the dataset, and __getitem__,
supporting integer indexing in range from 0 to len(self) exclusive.

My problem is that, what if the data comes in online streaming fashion, and I’m not able to find out __len__ at all? Or I just have a very large dataset, intend to iterate over it just once, so don’t care about the __len__ of it.
In both cases, could I ignore this __len__ function when subclassing Dataset safely?