-
Notifications
You must be signed in to change notification settings - Fork 169
Closed
Labels
Description
from torch.utils.data.graph import traverse
from torchdata.datapipes.iter import IterDataPipe, IterableWrapper
class CustomIterDataPipe(IterDataPipe):
def noop(self, x):
return x
def __init__(self):
self._dp = IterableWrapper([]).map(self.noop)
def __iter__(self):
yield from self._dp
traverse(CustomIterDataPipe())RecursionError: maximum recursion depth exceeded
Without the .map() call it works fine. I don't think this is specific to .map() though. From trying a few datapipes, this always happens if self._dp is composed in some way.
ejguan, NicolasHug and datumbox