imitation.scripts.analyze#
Commands to analyze experimental results.
Functions
|
Parse Sacred logs and generate a DataFrame for imitation learning results. |
Gather Tensorboard directories from a parallel_ex run. |
|
- imitation.scripts.analyze.analyze_imitation(csv_output_path, tex_output_path, print_table, table_verbosity)[source]#
Parse Sacred logs and generate a DataFrame for imitation learning results.
This function calls the helper _gather_sacred_dicts, which captures its arguments automatically via Sacred. Provide those arguments to select which Sacred results to parse.
- Parameters
csv_output_path (
Optional
[str
]) – If provided, then save a CSV output file to this path.tex_output_path (
Optional
[str
]) – If provided, then save a LaTeX-format table to this path.print_table (
bool
) – If True, then print the dataframe to stdout.table_verbosity (
int
) – Increasing levels of verbosity, from 0 to 3, increase the number of columns in the table. Level 3 prints all of the columns available.
- Return type
DataFrame
- Returns
The DataFrame generated from the Sacred logs.
- imitation.scripts.analyze.gather_tb_directories()[source]#
Gather Tensorboard directories from a parallel_ex run.
The directories are copied to a unique directory in /tmp/analysis_tb/ under subdirectories matching the Tensorboard events’ Ray Tune trial names.
This function calls the helper _gather_sacred_dicts, which captures its arguments automatically via Sacred. Provide those arguments to select which Sacred results to parse.
- Return type
dict
- Returns
A dict with two keys. “gather_dir” (str) is a path to a /tmp/ directory containing all the TensorBoard runs filtered from source_dir. “n_tb_dirs” (int) is the number of TensorBoard directories that were filtered.
- Raises
OSError – If the symlink cannot be created.