From 9df6ebdcf75315327019c4ea122c736582a7a81f Mon Sep 17 00:00:00 2001 From: Guillaume Wenzek Date: Tue, 10 Oct 2023 10:08:26 +0200 Subject: [PATCH] less spooky comment --- src/fairseq2/data/data_pipeline.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/fairseq2/data/data_pipeline.py b/src/fairseq2/data/data_pipeline.py index 71224e3fc..edd8434ec 100644 --- a/src/fairseq2/data/data_pipeline.py +++ b/src/fairseq2/data/data_pipeline.py @@ -33,8 +33,9 @@ class DataPipeline(Iterable[Any]): The pipeline state can be persisted to the disk, allowing it to be resumed later. It is a Python Iterable, but it also contains the iterator states. - Calling `iter` a second time while the first iterator is still being used - will segfault or worse. + + Calling `iter` twice will create two iterators reading from the same dataloader, + and sharing the same state, so it will behave inconcistently. """ def __iter__(self) -> Iterator[Any]: