Skip to content

Commit

Permalink
🐛Fixed cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
carefree0910 committed Oct 22, 2024
1 parent 1040e1c commit a68c6f1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/learn/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,10 @@ def remove(cls, iter: "AsyncDataLoaderIter") -> None:
@classmethod
def cleanup(cls) -> None:
if cls._cur is not None:
if not cls._cur._finalized:
cls._cur._cleanup()
cur = cls._cur
cls._cur = None
if not cur._finalized:
cur._cleanup()


class AsyncDataLoaderIter(_SingleProcessDataLoaderIter):
Expand Down

0 comments on commit a68c6f1

Please sign in to comment.