def analyze_experiment(spec, trial_data_dict): '''Analyze experiment and save data''' info_prepath = spec['meta']['info_prepath'] util.write(trial_data_dict, f'{info_prepath}_trial_data_dict.json') # calculate experiment df experiment_df = calc_experiment_df(trial_data_dict, info_prepath) # plot graph viz.plot_experiment(spec, experiment_df, METRICS_COLS) viz.plot_experiment_trials(spec, experiment_df, METRICS_COLS) # zip files predir, _, _, _, _, _ = util.prepath_split(info_prepath) shutil.make_archive(predir, 'zip', predir) logger.info(f'All experiment data zipped to {predir}.zip') return experiment_df
def analyze_experiment(spec, trial_data_dict): '''Analyze experiment and save data''' info_prepath = spec['meta']['info_prepath'] util.write(trial_data_dict, f'{info_prepath}_trial_data_dict.json') # calculate experiment df experiment_df = calc_experiment_df(trial_data_dict, info_prepath) # plot graph viz.plot_experiment(spec, experiment_df, METRICS_COLS) viz.plot_experiment_trials(spec, experiment_df, METRICS_COLS) # manually shut down orca server to avoid zombie processes viz.pio.orca.shutdown_server() # zip files predir, _, _, _, _, _ = util.prepath_split(info_prepath) zipdir = util.smart_path(predir) shutil.make_archive(zipdir, 'zip', zipdir) logger.info(f'All experiment data zipped to {predir}.zip') return experiment_df