diff --git a/bench.py b/bench.py
index eda69881dc667ac7ce8be2bbe035e044cf1b7ca2..6360db5488903f17a8998f7804d3d409e2483eb0 100755
--- a/bench.py
+++ b/bench.py
@@ -203,7 +203,11 @@ def main():
             os.makedirs(bench_res_dir, exist_ok=True)
 
         try:
-            bench = eval(f"importlib.import_module('src.benchmarks.{bench}').{bench}")
+            bench_module = importlib.import_module(f"src.benchmarks.{bench}")
+            if not hasattr(bench_module, bench):
+                continue
+
+            bench = getattr(bench_module, bench)
 
             if args.load:
                 bench.load(path=args.load)