From 5eeb83abb01eba405bb59489216db50017b61d10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Pietil=C3=A4?= <> Date: Mon, 19 Jan 2026 09:39:09 -0500 Subject: [PATCH] Improve runner script. --- script/RetinaNet/run_ck_profiler.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/script/RetinaNet/run_ck_profiler.py b/script/RetinaNet/run_ck_profiler.py index d4f40ee987..546132103f 100755 --- a/script/RetinaNet/run_ck_profiler.py +++ b/script/RetinaNet/run_ck_profiler.py @@ -148,10 +148,21 @@ class CKProfilerExecutor: print(f"\n{Colors.RED}Error Output:{Colors.RESET}") print(result.stderr) + # We want to take line that reads "Best configuration parameters:" and everything after that line from the stdout + stdout_best_config = "" + if result.stdout: + stdout_lines = result.stdout.splitlines() + capture = False + for line in stdout_lines: + if "Best configuration parameters:" in line: + capture = True + if capture: + stdout_best_config += line + "\n" + return { 'success': success, 'returncode': result.returncode, - 'stdout': result.stdout, + 'stdout': stdout_best_config, 'stderr': result.stderr, 'elapsed_time': elapsed_time, 'command': cmd_str @@ -265,7 +276,7 @@ class CKProfilerExecutor: 'elapsed_time': result.get('elapsed_time'), 'command': result.get('command'), 'error': result.get('error'), - 'stdout': result.get('stdout', '')[:500] if result.get('stdout') else None # Truncate long output + 'stdout': result.get('stdout', '') if result.get('stdout') else None # Truncate long output }) with open(output_file, 'w') as f: