From 9cdd9e12c3791b8d9851f7180bd2892259ebd548 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sat, 4 May 2024 17:52:46 -0700 Subject: [PATCH] catch all exceptions in the benchmark --- benchmark/benchmark.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/benchmark/benchmark.py b/benchmark/benchmark.py index 35314b370..389b0a46c 100755 --- a/benchmark/benchmark.py +++ b/benchmark/benchmark.py @@ -7,6 +7,7 @@ import re import shutil import subprocess import time +import traceback from collections import defaultdict from json.decoder import JSONDecodeError from pathlib import Path @@ -927,7 +928,17 @@ def get_replayed_content(replay_dname, test_dname): return "".join(res) -def run_test( +def run_test(*args, **kwargs): + try: + return run_test_real(*args, **kwargs) + except Exception as err: + print("=" * 40) + print("Test failed") + print(err) + traceback.print_exc() + + +def run_test_real( original_dname, testdir, model_name,