Skip to content

Include run_name in training logs for better run traceability #101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ Please keep the lists sorted alphabetically.
* Matthijs van der Boon
* Özhan Özen
* Pascal Roth
* Shaoshu Su
* Zhang Chong
* Ziqi Fan
5 changes: 5 additions & 0 deletions rsl_rl/runners/on_policy_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand All @@ -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"""
Expand Down