@@ -134,13 +134,15 @@ def __init__(
134134 ai_service_client : AiServiceClient ,
135135 executor : concurrent .futures .ThreadPoolExecutor ,
136136 future_all_code_repair : list [concurrent .futures .Future ],
137+ effort : str ,
137138 ) -> None :
138139 self .candidate_queue = queue .Queue ()
139140 self .line_profiler_done = False
140141 self .refinement_done = False
141142 self .candidate_len = len (initial_candidates )
142143 self .ai_service_client = ai_service_client
143144 self .executor = executor
145+ self .effort = effort
144146
145147 # Initialize queue with initial candidates
146148 for candidate in initial_candidates :
@@ -190,13 +192,13 @@ def _process_refinement_results(self) -> OptimizedCandidate | None:
190192 future_refinements : list [concurrent .futures .Future ] = []
191193 top_n_candidates = int (
192194 min (
193- get_effort_value (EffortKeys .TOP_VALID_CANDIDATES_FOR_REFINEMENT , self .args . effort ),
195+ get_effort_value (EffortKeys .TOP_VALID_CANDIDATES_FOR_REFINEMENT , self .effort ),
194196 len (self .all_refinements_data ),
195197 )
196198 )
197199
198200 if top_n_candidates == len (self .all_refinements_data ) or len (self .all_refinements_data ) <= get_effort_value (
199- EffortKeys .REFINE_ALL_THRESHOLD , self .args . effort
201+ EffortKeys .REFINE_ALL_THRESHOLD , self .effort
200202 ):
201203 for data in self .all_refinements_data :
202204 future_refinements .append (self .refine_optimizations ([data ])) # noqa: PERF401
@@ -944,6 +946,7 @@ def determine_best_candidate(
944946 self .aiservice_client ,
945947 self .executor ,
946948 self .future_all_code_repair ,
949+ self .args .effort ,
947950 )
948951 candidate_index = 0
949952
0 commit comments