diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 00692ba7..bafc69ed 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -37,5 +37,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 46a9b524..b9f2e778 100644 --- a/rsl_rl/runners/on_policy_runner.py +++ b/rsl_rl/runners/on_policy_runner.py @@ -238,10 +238,14 @@ def log(self, locs: dict, width: int = 80, pad: int = 35) -> None: 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""" @@ -262,6 +266,7 @@ def log(self, locs: dict, width: int = 80, pad: int = 35) -> None: 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"""