-
Notifications
You must be signed in to change notification settings - Fork 174
Closed
Description
When the Error comes from singleton iterator. This part of message becomes duplicated.
You can run the following example:
source_dp = IterableWrapper(range(10))
it1 = iter(source_dp)
next(it1)
it2 = iter(source_dp)
next(it2)
next(it1)The Error message is:
RuntimeError: This iterator has been invalidated because another iterator has been created from the same IterDataPipe: IterableWrapperIterDataPipe(deepcopy=True, iterable=range(0, 10))
This may be caused multiple references to the same IterDataPipe. We recommend using `.fork()` if that is necessary.
For feedback regarding this single iterator per IterDataPipe constraint, feel free to comment on this issue: https://github.com/pytorch/data/issues/45.
This exception is thrown by __iter__ of IterableWrapperIterDataPipe(deepcopy=True, iterable=range(0, 10))cc: @NivekT
Originally posted by @ejguan in pytorch/pytorch#75618 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels