Skip to content

Commit

Permalink
fix ppov2_trainer tensorboard log bugs (#1836)
Browse files Browse the repository at this point in the history
  • Loading branch information
DZ9 authored Jul 16, 2024
1 parent a2adfb8 commit 052a8e1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions trl/trainer/ppov2_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,7 @@ def repeat_generator():
metrics["lr"] = self.lr_scheduler.get_last_lr()[0]
metrics["episode"] = global_step
self.state.epoch = global_step / self.train_dataset_len # used by self.log
self.state.global_step += 1
self.log(metrics)
del kl, mean_kl, mean_entropy, mean_non_score_reward, scores, metrics, non_score_reward
torch.cuda.empty_cache()
Expand Down

0 comments on commit 052a8e1

Please sign in to comment.