diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index ca06f311..4dec7f05 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -35,5 +35,6 @@ Please keep the lists sorted alphabetically. * Matthijs van der Boon * Özhan Özen * Pascal Roth +* Shaoshu Su * Zhang Chong * Ziqi Fan diff --git a/rsl_rl/runners/on_policy_runner.py b/rsl_rl/runners/on_policy_runner.py index 36f11f37..cfe38a02 100644 --- a/rsl_rl/runners/on_policy_runner.py +++ b/rsl_rl/runners/on_policy_runner.py @@ -239,10 +239,14 @@ def log(self, locs: dict, width: int = 80, pad: int = 35): str = f" \033[1m Learning iteration {locs['it']}/{locs['tot_iter']} \033[0m " + run_name = self.cfg.get("run_name") + run_name_string = f"""{'Run name:':>{pad}} {run_name}\n""" if run_name else "" + if len(locs["rewbuffer"]) > 0: log_string = ( f"""{'#' * width}\n""" f"""{str.center(width, ' ')}\n\n""" + f"""{run_name_string}""" f"""{'Computation:':>{pad}} {fps:.0f} steps/s (collection: {locs[ 'collection_time']:.3f}s, learning {locs['learn_time']:.3f}s)\n""" f"""{'Mean action noise std:':>{pad}} {mean_std.item():.2f}\n""" @@ -263,6 +267,7 @@ def log(self, locs: dict, width: int = 80, pad: int = 35): log_string = ( f"""{'#' * width}\n""" f"""{str.center(width, ' ')}\n\n""" + f"""{run_name_string}""" f"""{'Computation:':>{pad}} {fps:.0f} steps/s (collection: {locs[ 'collection_time']:.3f}s, learning {locs['learn_time']:.3f}s)\n""" f"""{'Mean action noise std:':>{pad}} {mean_std.item():.2f}\n"""