Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
caic99 committed Nov 28, 2024
1 parent 3895c94 commit ddc39de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deepmd/pt/utils/dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def run(self) -> None:
self._queue.put(item) # Blocking if the queue is full

# Signal the consumer we are done; this should not happen for DataLoader
self._queue.put(StopIteration)
self._queue.put(StopIteration())


QUEUESIZE = 32
Expand Down Expand Up @@ -250,7 +250,7 @@ def __next__(self):
wait_time > 1.0
): # Even for Multi-Task training, each step usually takes < 1s
log.warning(f"Data loading is slow, waited {wait_time:.2f} seconds.")
if issubclass(item, Exception):
if isinstance(item, Exception):
raise item
return item

Expand Down

0 comments on commit ddc39de

Please sign in to comment.