@@ -46,7 +46,7 @@ def __init__(
4646
4747 def _autotune (self ) -> Config :
4848 self .log (
49- f"Starting PatternSearch with initial_population={ self .initial_population } , copies={ self .copies } "
49+ f"Starting PatternSearch with initial_population={ self .initial_population } , copies={ self .copies } , max_generations= { self . max_generations } "
5050 )
5151 visited = set ()
5252 self .population = []
@@ -59,7 +59,7 @@ def _autotune(self) -> Config:
5959 self .population .append (member )
6060 self .parallel_benchmark_population (self .population , desc = "Initial population" )
6161 # again with higher accuracy
62- self .rebenchmark_population (self .population , desc = "Initial rebench " )
62+ self .rebenchmark_population (self .population , desc = "Verifying initial results " )
6363 self .population .sort (key = performance )
6464 starting_points = []
6565 for member in self .population [: self .copies ]:
@@ -88,21 +88,25 @@ def _autotune(self) -> Config:
8888 new_population [id (member )] = member
8989 if num_active == 0 :
9090 break
91+
92+ # Log generation header before compiling/benchmarking
93+ self .log (
94+ f"Generation { generation } starting: { num_neighbors } neighbors, { num_active } active search path(s)"
95+ )
96+
9197 self .population = [* new_population .values ()]
9298 # compile any unbenchmarked members in parallel
9399 unbenchmarked = [m for m in self .population if len (m .perfs ) == 0 ]
94100 if unbenchmarked :
95101 self .parallel_benchmark_population (
96- unbenchmarked , desc = f"Gen { generation } neighbors"
102+ unbenchmarked , desc = f"Generation { generation } : Exploring neighbors"
97103 )
98104 # higher-accuracy rebenchmark
99105 self .rebenchmark_population (
100- self .population , desc = f"Gen { generation } rebench"
101- )
102- self .log (
103- f"Generation { generation } , { num_neighbors } neighbors, { num_active } active:" ,
104- self .statistics ,
106+ self .population , desc = f"Generation { generation } : Verifying top configs"
105107 )
108+ # Log final statistics for this generation
109+ self .log (f"Generation { generation } complete:" , self .statistics )
106110 return self .best .config
107111
108112 def _pattern_search_from (
0 commit comments