OmniOpt2-Logo ScaDS.ai-Logo
CI Badge PyPI Version

Plot your results

Plot over X11

Plot from overview

To plot over X11, make sure you are connected with ssh -X user@login2.barnard.hpc.tu-dresden.de (of course, use the HPC system you wish instead of barnard, if applicable, and change it to your user). Then, cd into your OmniOpt2 directory. Assuming you have already ran an OmniOpt2-run and the results are in runs/my_experiment/0 (adapt this to your experiment folder!), run this:
./omniopt_plot runs/my_experiment/0
You will be presented by a menu like this:
Plot-Overview
Use your arrow keys to navigate to the plot type you like, and then press enter.

Plot directly

If you know what plot you want, you can directly plot it by using:
./omniopt_plot runs/my_experiment/0 scatter # change plot_type accordingly

Plot to file

All plot scripts support to export your plot to a file.
./omniopt_plot runs/my_experiment/0 scatter --save_to_file filename.svg # change plot_type and file name accordingly. Allowed are svg and png.

Plot types

There are many different plot types, some of which can only be shown on jobs that ran on Taurus, or jobs with more than a specific number of results or parameters. If you run the omniopt_plot-script, it will automatically show you plots that are readily available.

CPU/RAM Usage

./omniopt_plot runs/my_experiment/0 cpu_ram_usage

Plot CPU and RAM Usage over time for the main worker

cpu_ram_usage plot example
Parameter Description Type Action Default Value
Ungrouped
--save_to_file
Path to save the plot(s)
str
--run_dir
Path to a CSV file
str
--no_plt_show
Disable showing the plot
bool
store_true
False

General Job Infos

./omniopt_plot runs/my_experiment/0 general

The general-plot shows you general info about your job. It consists of four subgraphs:

general plot example
Parameter Description Type Action Default Value
Ungrouped
--min
Minimum value for result filtering
float
--max
Maximum value for result filtering
float
--save_to_file
Path to save the plot(s)
str
--run_dir
Path to a CSV file
str
--bins
Number of bins for distribution of results
int
10
--alpha
Transparency of plot bars
float
0
--no_plt_show
Disable showing the plot
bool
store_true
False

Plot GPU usage over time on different hosts

./omniopt_plot runs/my_experiment/0 gpu_usage

Shows the workload of different GPUs on all nodes that jobs of an evaluation has run on over time.

gpu_usage plot example
Parameter Description Type Action Default Value
Ungrouped
--run_dir
Directory where to search for CSV files
str
--no_legend
Disables legend (useless here)
bool
store_true
False
--save_to_file
Path to save the plot(s)
str
--no_plt_show
Disable showing the plot
bool
store_true
False

Kernel-Density-Estimation-Plots (KDE)

./omniopt_plot runs/my_experiment/0 kde

Kernel-Density-Estimation-Plots, short KDE-Plots, group different runs into so-called bins by their result range and parameter range.

Each grouped result gets a color, green means lower, red means higher, and is plotted as overlaying bar charts.

These graphs thus show you, which parameter range yields which results, and how many of them have been tried, and how 'good' they were, i.e. closer to the minimum (green).

kde plot example
Parameter Description Type Action Default Value
Ungrouped
--run_dir
Path to a run dir
str
--bins
Number of bins for distribution of results
int
10
--alpha
Transparency of plot bars (between 0 and 1)
float
0
--no_legend
Disables legend
bool
store_true
False
--save_to_file
Save the plot to the specified file
str
--no_plt_show
Disable showing the plot
bool
store_true
False

Scatter-2d

./omniopt_plot runs/my_experiment/0 scatter

The scatter plot shows you all 2d combinations of the hyperparameter space and, for each evaluation, a dot is printed. The color of the dot depends on the result value of this specific run. The lower, the greener, and the higher, the more red they are. Thus, you can see how many results were attained and how they were, and where they have been searched.

scatter plot example
Parameter Description Type Action Default Value
Ungrouped
--run_dir
Path to a CSV file
str
--save_to_file
Save the plot to the specified file
str
--max
Maximum value
float
--min
Minimum value
float
--darkmode
Enable darktheme
bool
store_true
False
--bubblesize
Size of the bubbles
int
15
--merge_with_previous_runs
Run-Dirs to be merged with
append
--exclude_params
Params to be ignored
append
--allow_axes
Allow specific axes only (parameter names)
append
--no_legend
Disables legend
bool
store_true
False
--no_plt_show
Disable showing the plot
bool
store_true
False

Scatter-Generation-Method

./omniopt_plot runs/my_experiment/0 scatter_generation_method

This is similar to the scatter plot, but also shows you which generation method (i.e. SOBOL, BoTorch, ...) is responsible for creating that point, and how the generation methods are scattered over each axis of the hyperparameter optimization problem. Thus, you can see how many runs have been tried and where exactly.

scatter_generation_method plot example
Parameter Description Type Action Default Value
Ungrouped
--min
Minimum value for result filtering
float
--max
Maximum value for result filtering
float
--save_to_file
Path to save the plot(s)
str
--run_dir
Path to a CSV file
str
--no_plt_show
Disable showing the plot
bool
store_true
False

Hex-Scatter plot

./omniopt_plot runs/my_experiment/0 scatter_hex

Similar to scatter plot, but here many runs are grouped into hexagonal subspaces of the parameter combinations, and the groups are coloured by their average result, and as such you can see an approximation of the function space. This allows you to quickly grasp 'good' areas of your hyperparameter space.

scatter_hex plot example
Parameter Description Type Action Default Value
Ungrouped
--run_dir
Path to a CSV file
str
--save_to_file
Save the plot to the specified file
str
--max
Maximum value
float
--min
Minimum value
float
--darkmode
Enable darktheme
bool
store_true
False
--merge_with_previous_runs
Run-Dirs to be merged with
append
--exclude_params
Params to be ignored
append
--allow_axes
Allow specific axes only (parameter names)
append
--no_legend
Disables legend
bool
store_true
False
--bins
Number of bins for distribution of results
str
--gridsize
Gridsize for hex plots
int
5
--no_plt_show
Disable showing the plot
bool
store_true
False

Plot time and exit code infos

./omniopt_plot runs/my_experiment/0 time_and_exit_code

This graph has 4 subgraphs that show different information regarding the job runtime, it's results and it's exit codes.

time_and_exit_code plot example
Parameter Description Type Action Default Value
Ungrouped
--run_dir
Directory containing worker usage CSV file
str
--save_to_file
Save the plot to the specified file
str
--bins
Number of bins for distribution of results (useless here)
int
10
--no_plt_show
Disable showing the plot
bool
store_true
False

Plot trial index/result

./omniopt_plot runs/my_experiment/0 trial_index_result

The trial-index is a continuous number that, for each run that is completed, is increased. Using it as x-axis allows you to trace how the results developed over time. Usually, the result should go down (at minimization runs) over time, though it may spike out a bit.

trial_index_result plot example
Parameter Description Type Action Default Value
Ungrouped
--min
Minimum value for result filtering
float
--max
Maximum value for result filtering
float
--save_to_file
Path to save the plot(s)
str
--run_dir
Path to a CSV file
str
--no_plt_show
Disable showing the plot
bool
store_true
False

Plot number of workers over time

./omniopt_plot runs/my_experiment/0 worker

Shows the amount of requested workers, and the amount of real workers over time.

worker plot example
Parameter Description Type Action Default Value
Ungrouped
--run_dir
Directory containing worker usage CSV file
str
--debug
Enable debug mode
bool
store_true
False
--save_to_file
Save the plot to the specified file
str
--no_plt_show
Disable showing the plot
bool
store_true
False