Skip to content

Commit c6c77de

Browse files
committed
optuna: tweak logging
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
1 parent b5893b6 commit c6c77de

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

optuna/optimize_dse.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,6 @@ def main():
264264
# Print results
265265
print(f"\n{'=' * 70}\nResults\n{'=' * 70}")
266266

267-
print(f"Pareto optimal solutions: {len(study.best_trials)}")
268267
if len(study.best_trials) == 0:
269268
print("\n⚠️ No feasible trials completed!")
270269
print("All trials either failed to build or violated timing constraints.")
@@ -291,15 +290,14 @@ def write_trial(f, trial):
291290
+ "\n"
292291
)
293292

294-
for i, trial in enumerate(study.best_trials[:5]): # Show top 5
295-
print(f"\nSolution {i+1}:")
293+
print(f"Pareto optimal solutions: {len(study.best_trials)}")
294+
for i, trial in enumerate(study.best_trials):
296295
write_trial(sys.stdout, trial)
297296

298297
plot_file = os.path.join(output_dir, "optuna_dse_results.html")
299298
fig = optuna.visualization.plot_pareto_front(
300299
study,
301300
target_names=["Area", "Compute/Power", "Compute/time"],
302-
include_dominated_trials=True,
303301
)
304302
fig.write_html(plot_file)
305303
print(f"Log file saved to: {log_file_name}")

0 commit comments

Comments
 (0)