From a072ba3dbae53cc8e861527ad9d4894d10ab2a13 Mon Sep 17 00:00:00 2001 From: Maciej Urbanski Date: Tue, 27 Aug 2024 15:22:48 +0200 Subject: [PATCH] simplify path display in ./analyze.py output --- tests/integration/analyze.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/integration/analyze.py b/tests/integration/analyze.py index 4627355..2089cdd 100755 --- a/tests/integration/analyze.py +++ b/tests/integration/analyze.py @@ -3,6 +3,7 @@ import collections import hashlib import logging +import pathlib import tools.exp import yaml @@ -36,10 +37,11 @@ def hash_output(output: dict) -> str: output_hash = hash_output(run_output.output) runs_by_hash[output_hash].append(run_output) + cwd_path = pathlib.Path().cwd() print(f"Found {len(runs_by_hash)} unique outputs for {len(runs_outputs)} runs") for group_no, (output_hash, runs) in enumerate(runs_by_hash.items()): print(f"[bold]Group {group_no}[/bold] hash={output_hash[:6]} runs={len(runs)}") for run in runs: - print(f" - Run: {run.run_id} ({run.output_dir_path})") + print(f" - Run: {run.run_id} {str(run.output_dir_path.relative_to(cwd_path))!r}") print(f" - {run.sysinfo['cuda']}") print(f" - {run.sysinfo['machine']['gpu']}")