@@ -123,8 +123,8 @@ def run_trial(frequency_MHz, coreVoltage_mV, trial_number):
123123 actual_coreVoltage_mV = stats .get ("coreVoltage" , 0 )
124124
125125 try :
126- np .testing .assert_allclose (actual_frequency_MHz , frequency_MHz , rtol = 1e-3 )
127- np .testing .assert_allclose (actual_coreVoltage_mV , coreVoltage_mV , rtol = 1e-3 )
126+ np .testing .assert_allclose (actual_frequency_MHz , frequency_MHz , rtol = 3 * 1e-3 )
127+ np .testing .assert_allclose (actual_coreVoltage_mV , coreVoltage_mV , rtol = 3 * 1e-3 )
128128 except AssertionError :
129129 console .print_exception ()
130130 console .print ("[bold red]Real parameter not set within tolerance of 1%[/bold red]" )
@@ -221,16 +221,19 @@ def entrypoint():
221221 study .optimize (run_study , n_trials = n_trials )
222222
223223 console .rule ("[bold green]Optimization Complete[/bold green]" )
224- final = Table (title = "Best Trial Results" , show_lines = True )
225- final .add_column ("Parameter" , style = "cyan" )
226- final .add_column ("Value" , style = "magenta" )
227- for trial in study .best_trials :
228- for key , val in trial .params .items ():
229- final .add_row (key , str (val ))
230-
231- final .add_row ("objectives" , f"{ trial .values } " )
224+ console .print ("Best trials per objective from multi-objective optimization:" )
232225
233- console .print (final )
226+ for i , trial in enumerate (study .best_trials , start = 1 ):
227+ table = Table (
228+ title = f"Best Multi-Objective Result { i } /{ len (study .best_trials )} - Trial { trial .number } " , show_lines = True
229+ )
230+ table .add_column ("Parameter" , style = "cyan" )
231+ table .add_column ("Value" , style = "magenta" )
232+ for key , val in trial .params .items ():
233+ table .add_row (key , str (val ))
234+ table .add_section ()
235+ table .add_row ("Objectives: hashRate (TH/s), efficiency (J/TH)" , f"{ trial .values } " )
236+ console .print (table )
234237
235238
236239if __name__ == "__main__" :
0 commit comments