File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ def run_benchmarks(
5353 function_benchmark_timings : dict [str , dict [BenchmarkKey , float ]] = {}
5454 total_benchmark_timings : dict [BenchmarkKey , float ] = {}
5555
56- if not (self .args .benchmark and num_optimizable_functions > 0 ):
56+ if not (hasattr ( self . args , "benchmark" ) and self .args .benchmark and num_optimizable_functions > 0 ):
5757 return function_benchmark_timings , total_benchmark_timings
5858
5959 from codeflash .benchmarking .instrument_codeflash_trace import instrument_codeflash_trace_decorator
@@ -215,7 +215,8 @@ def create_function_optimizer(
215215
216216 function_specific_timings = None
217217 if (
218- self .args .benchmark
218+ hasattr (self .args , "benchmark" )
219+ and self .args .benchmark
219220 and function_benchmark_timings
220221 and qualified_name_w_module in function_benchmark_timings
221222 and total_benchmark_timings
You can’t perform that action at this time.
0 commit comments