From d73f18480f8525849eccb53fa7cdb123c393a53b Mon Sep 17 00:00:00 2001 From: Sangbum Daniel Choi <34004152+SangbumChoi@users.noreply.github.com> Date: Thu, 30 Nov 2023 17:21:47 +0900 Subject: [PATCH] Update flash_4.py log exception error for clarity --- segment_anything_fast/flash_4.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/segment_anything_fast/flash_4.py b/segment_anything_fast/flash_4.py index 2124f20..f41905e 100644 --- a/segment_anything_fast/flash_4.py +++ b/segment_anything_fast/flash_4.py @@ -154,7 +154,8 @@ def benchmark_torch_function_in_microseconds(f, *args, **kwargs): t0 = benchmark.Timer( stmt="f(*args, **kwargs)", globals={"args": args, "kwargs": kwargs, "f": f} ) - except: + except Exception as e: + print(f"Error occured: {e}") return None return t0.blocked_autorange().mean * 1e6