graphorge.gnn_base_model.optimization.hydra_optimization_plots.plot_optimization_history

plot_optimization_history(optim_history, optim_metric, is_log_metric=False, objective_scale='linear', filename=None, save_dir=None, is_save_fig=False, is_stdout_display=False, is_latex=False)[source]

Plot Hydra multi-run optimization process history.

Assumes that each Hydra multi-run optimization process generates a ‘job_summary.dat’ file for each job (in hydra_cfg.runtime.output_dir) with data formatted as < optim_metric >: < value >.

Parameters:
  • optim_history (dict) – One or more multi-run optimization processes (key, str) jobs directories (item, str). The multi-run job directory is set in Hydra configuration file (hydra.sweep.dir). Dictionary keys are taken as labels in the corresponding optimization processes history plot.

  • optim_metric (str) – The metric whose optimization process history is to be plotted. Must be available from all optimization processes jobs summary data files in the format < optim_metric >: < value >.

  • is_log_metric (bool, default=False) – Applies logarithm to optimization metric values if True, keeps original metric values otherwise.

  • objective_scale ({'linear', 'log'}, default='linear') – Optimization metric values axis scale type.

  • filename (str, default=None) – Figure name. If None, then figure name is set as optimization_history_{optim_metric}.

  • save_dir (str, default=None) – Directory where figure is saved. If None, then figure is saved in current working directory.

  • is_save_fig (bool, default=False) – Save figure.

  • is_stdout_display (bool, default=False) – True if displaying figure to standard output device, False otherwise.

  • is_latex (bool, default=False) – If True, then render all strings in LaTeX. If LaTex is not available, then this option is silently set to False and all input strings are processed to remove $(…)$ enclosure.