print('min_epoch_count: {}'.format(min_epoch_count)) if len(accuracies[tasks]) > max_epoch_count: max_epoch_count = len(accuracies[tasks]) print('max_epoch_count: {}'.format(max_epoch_count)) except: print('{} not found'.format(tasks)) return accuracies, min_epoch_count, max_epoch_count if __name__ == '__main__': accuracies, min_epoch_count, max_epoch_count = read_pkls() pprint(accuracies) plot_accuracies( epoch_limit, min_epoch_count, max_epoch_count, accuracies.items(), task_ids, 'Ablation study', 'components_removed_training_accuracy.png', y_offsets={ 'main': 0.0015, 'no_story_again': -0.0015, 'no_same_rnn': -0.001 }, ylim=(0.85, 1), moving_avg=4, )
min_epoch_count = 100000 epoch_limit = 200 hpconfigs = [ 'hpconfig_story_len_10', 'hpconfig_story_len_20', 'hpconfig_story_len_30', 'hpconfig_story_len_40', 'hpconfig_story_len_50', 'hpconfig_story_len_60', 'hpconfig', # all ] if __name__ == '__main__': accuracies, min_epoch_count, max_epoch_count = read_pkls( hpconfigs, 'hpconfig_story_len_(\d+)') pprint(accuracies) labels = {k: 'story_len = {}'.format(k) for k in accuracies.keys()} labels['main'] = 'main' plot_accuracies( epoch_limit, min_epoch_count, max_epoch_count, accuracies.items(), task_ids, 'Story length', 'story_len_training_accuracy.png', labels=labels, y_offsets={}, )
min_epoch_count = 100000 epoch_limit = 200 hpconfigs = [ 'hpconfig_1_reasoning_steps', 'hpconfig_3_reasoning_steps', 'hpconfig_4_reasoning_steps', 'hpconfig_5_reasoning_steps', 'hpconfig', ] if __name__ == '__main__': accuracies, min_epoch_count, max_epoch_count = read_pkls( hpconfigs, 'hpconfig_(\d+)_reasoning_steps') pprint(accuracies) labels = { k: 'steps = {}'.format(k) for k in accuracies.keys() if k != 'main' } labels['main'] = 'steps = 2' plot_accuracies(epoch_limit, min_epoch_count, max_epoch_count, accuracies.items(), task_ids, 'Reasoning Steps', 'reasoning_steps_training_accuracy.png', labels=labels, y_offsets={}, ylim=(0.6, 1))
'hpconfig_50percent_dataset', 'hpconfig_75percent_dataset', 'hpconfig' ] if __name__ == '__main__': accuracies, min_epoch_count, max_epoch_count = read_pkls( hpconfigs, 'hpconfig_(\d+)percent_dataset') pprint(accuracies) labels = { k: 'size = {:0.2f}'.format(float(k) / 100) for k in accuracies.keys() if k != 'main' } labels['main'] = 'main' plot_accuracies(epoch_limit, min_epoch_count, max_epoch_count, accuracies.items(), task_ids, 'Dataset Size', 'dataset_training_accuracy.png', labels=labels, y_offsets={ '10': 0.0, '20': 0.0, '30': -0.005, '40': 0.005, '50': 0.005, '75': -0.007, 'main': 0.007 }, ylim=(0.6, 1))
import sys sys.path.append('..') import matplotlib.pyplot as plt import importlib from anikattu.utilz import initialize_task plt.style.use('ggplot') import pickle from plot_combined_accuracy import task_names, task_ids, plot_accuracies from heatmap_task_accuracies import read_pkls root_dirs = {} accuracies = {} max_epoch_count = 0 min_epoch_count = 100000 epoch_limit = 200 if __name__ == '__main__': accuracies, min_epoch_count, max_epoch_count = read_pkls() plot_accuracies(epoch_limit, min_epoch_count, max_epoch_count, accuracies.items(), task_ids, 'Individual Training Accuracy', 'individual_training_accuracy.png')