We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 99d3204 commit 6162901Copy full SHA for 6162901
tianshou/trainer/base.py
@@ -563,10 +563,9 @@ def execute_epoch(self) -> EpochStats:
563
self._stop_fn_flag = training_step_result.is_training_done()
564
self._env_step += training_step_result.get_env_step_advancement()
565
training_stats = training_step_result.get_training_stats()
566
- assert training_stats is not None
567
TraceLogger.log(
568
log,
569
- lambda: f"Training step complete: stats={training_stats.get_loss_stats_dict()}",
+ lambda: f"Training step complete: stats={training_stats.get_loss_stats_dict() if training_stats else None}",
570
)
571
self._log_params(self.algorithm)
572
0 commit comments