Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinkle23897 committed Mar 17, 2022
1 parent 6df9365 commit 7a00daf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tianshou/trainer/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def __next__(self) -> Union[None, Tuple[int, Dict[str, Any], Dict[str, Any]]]:

# iterator exhaustion check
if self.epoch >= self.max_epoch:
if self.save_fn:
if self.test_collector is None and self.save_fn:
self.save_fn(self.policy)
raise StopIteration

Expand Down

0 comments on commit 7a00daf

Please sign in to comment.