Skip to content

Commit

Permalink
env steps
Browse files Browse the repository at this point in the history
  • Loading branch information
BartekCupial committed Oct 29, 2024
1 parent abbc459 commit 287fa08
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions sample_factory/algo/learning/learner.py
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,7 @@ def _record_summaries(self, train_loop_vars) -> AttrDict:
self.last_summary_time = time.time()
stats = AttrDict()

stats.env_steps = self.env_steps
stats.lr = self.curr_lr
stats.actual_lr = train_loop_vars.actual_lr # potentially scaled because of masked data

Expand Down
8 changes: 8 additions & 0 deletions sample_factory/utils/wandb_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ def init_wandb_func():

wandb.config.update(cfg, allow_val_change=True)

wandb.define_metric("train/env_steps")
wandb.define_metric("train/*", step_metric="train/env_steps")
wandb.define_metric("perf/*", step_metric="train/env_steps")
wandb.define_metric("len/*", step_metric="train/env_steps")
wandb.define_metric("policy_stats/*", step_metric="train/env_steps")
wandb.define_metric("reward/*", step_metric="train/env_steps")
wandb.define_metric("stats/*", step_metric="train/env_steps")


def finish_wandb(cfg):
if cfg.with_wandb:
Expand Down

0 comments on commit 287fa08

Please sign in to comment.