Skip to content

Commit

Permalink
Added a print_best in the end
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikOrm committed Jan 18, 2024
1 parent 123561c commit 8495a04
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion hypermapper/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,14 @@ def optimize(
else:
best_point = get_min_configurations(data_array, 1)

sys.stdout.write_protocol("End of HyperMapper\n")
keys = inputs + objectives + (["feasible"] if feasible_output["enable_feasible_predictor"] else [])
best_point = list(best_point.parameters_array.numpy()[0]) + list(best_point.metrics_array.numpy()[0]) + (list(best_point.feasible_array.numpy()[0]) if feasible_output["enable_feasible_predictor"] else [])
sys.stdout.write_protocol("Best point found:\n")
sys.stdout.write_protocol(f"{','.join(keys)}\n")
sys.stdout.write_protocol(f"{','.join([str(v) for v in best_point])}\n\n")

sys.stdout.write_protocol("End of HyperMapper\n")
return None

def main():
parser = argparse.ArgumentParser()
Expand Down

0 comments on commit 8495a04

Please sign in to comment.