hive.utils.visualization module
- hive.utils.visualization.find_single_run_data(run_folder)[source]
Looks for a chomp logger data file in run_folder and it’s subdirectories. Once it finds one, it loads the file and returns the data.
- Parameters
run_folder (str) – Which folder to search for the chomp logger data.
- Returns
The Chomp object containing the logger data.
- hive.utils.visualization.find_all_runs_data(runs_folder)[source]
Iterates through each directory in runs_folder, finds one chomp logger data file in each directory, and concatenates the data together under each key present in the data.
- Parameters
runs_folder (str) – Folder which contains subfolders, each of from which one chomp logger data file is loaded.
- Returns
Dictionary with each key corresponding to a key in the chomp logger data files. The values are the folder
- hive.utils.visualization.find_all_experiments_data(experiments_folder, runs_folders)[source]
Finds and loads all log data in a folder.
Assuming the directory structure is as follows:
experiment ├── config_1_runs | ├──seed0/ | ├──seed1/ | . | . | └──seedn/ ├── config_2_runs | ├──seed0/ | ├──seed1/ | . | . | └──seedn/ ├── config_3_runs | ├──seed0/ | ├──seed1/ | . | . | └──seedn/
Where there is some chomp logger data file under each seed directory, then passing “experiment” and the list of config folders (“config_1_runs”, “config_2_runs”, “config_3_runs”), will load all the data.
- hive.utils.visualization.standardize_data(experiment_data, x_key, y_key, num_sampled_points=1000, drop_last=True)[source]
Extracts given keys from data, and standardizes the data across runs by sampling equally spaced points along x data, and interpolating y data of each run.
- Parameters
experiment_data – Data object in the format of
find_all_experiments_data()
.x_key (str) – Key for x axis.
y_key (str) – Key for y axis.
num_sampled_points (int) – How many points to sample along x axis.
drop_last (bool) – Whether to drop the last point in the data.
- hive.utils.visualization.find_and_standardize_data(experiments_folder, runs_folders, x_key, y_key, num_sampled_points, drop_last)[source]
Finds and standardizes the data in experiments_folder.
- Parameters
experiments_folder (str) – Root folder with all experiments data.
runs_folders (list[str]) – List of folders under root folder to load data from.
x_key (str) – Key for x axis.
y_key (str) – Key for y axis.
num_sampled_points (int) – How many points to sample along x axis.
drop_last (bool) – Whether to drop the last point in the data.
- hive.utils.visualization.generate_lineplot(x_datas, y_datas, smoothing_fn=None, line_labels=None, xlabel=None, ylabel=None, cmap_name=None, output_file='output.png')[source]
Aggregates data and generates lineplot.