Skip to content

Commit ddcc59f

Browse files
committed
Add try for run transforms
1 parent b38632e commit ddcc59f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

benchmark/runner.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import time
55
from pathlib import Path
66
from typing import Any
7+
from warnings import warn
78

89
import numpy as np
910
from tqdm import tqdm
@@ -246,9 +247,12 @@ def run(self, output_path: Path | None = None) -> dict[str, Any]:
246247
}
247248

248249
# Run benchmarks
249-
results = {
250-
str(spec): self.run_transform(spec, images) for spec in tqdm(TRANSFORM_SPECS, desc="Running transforms")
251-
}
250+
results = {}
251+
for spec in tqdm(TRANSFORM_SPECS, desc="Running transforms"):
252+
try:
253+
results[str(spec)] = self.run_transform(spec, images)
254+
except Exception as e:
255+
warn(f"Transform {spec} failed: {e}")
252256

253257
# Combine results and metadata
254258
full_results = {

0 commit comments

Comments
 (0)