Skip to content

Commit cde4189

Browse files
committed
linting
1 parent d734169 commit cde4189

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

helion/autotuner/base_search.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,9 @@ def parallel_overlapped_benchmark(
794794

795795
next(iterator, None) # Update progress bar
796796

797-
ordered_results: list[BenchmarkResult] = [results[i] for i in range(len(configs))]
797+
ordered_results: list[BenchmarkResult] = [
798+
results[i] for i in range(len(configs))
799+
]
798800

799801
return ordered_results
800802

@@ -1244,12 +1246,16 @@ def check_benchmark_stability(self) -> None:
12441246
overlap_stability_threshold, overlap is automatically disabled.
12451247
"""
12461248
rebenchmarked = [
1247-
m for m in self.population
1249+
m
1250+
for m in self.population
12481251
if len(m.perfs) > 1 and min(m.perfs[0], m.perfs[1]) > 0
12491252
]
12501253
if len(rebenchmarked) < 2:
12511254
return
1252-
ratios = [max(m.perfs[0], m.perfs[1]) / min(m.perfs[0], m.perfs[1]) for m in rebenchmarked]
1255+
ratios = [
1256+
max(m.perfs[0], m.perfs[1]) / min(m.perfs[0], m.perfs[1])
1257+
for m in rebenchmarked
1258+
]
12531259
avg_ratio = sum(ratios) / len(ratios)
12541260
threshold = self.settings.overlap_stability_threshold
12551261
self.log(

helion/autotuner/surrogate_pattern_search.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,9 @@ def _autotune(self) -> Config:
354354
self.rebenchmark(successful, desc="Verifying initial results")
355355
self.check_benchmark_stability()
356356
else:
357-
self.rebenchmark_population(self.population, desc="Verifying initial results")
357+
self.rebenchmark_population(
358+
self.population, desc="Verifying initial results"
359+
)
358360
self.population.sort(key=performance)
359361
starting_points = []
360362
for member in self.population[: self.copies]:

0 commit comments

Comments
 (0)