Skip to content

Commit

Permalink
less spooky comment
Browse files Browse the repository at this point in the history
  • Loading branch information
gwenzek committed Oct 10, 2023
1 parent b4fb6d1 commit 9df6ebd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/fairseq2/data/data_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down

0 comments on commit 9df6ebd

Please sign in to comment.