<commit_before><commit_msg>Visualization of reward.<commit_after>import argparse
import matplotlib.pyplot as plt
import tables


if __name__ == '__main__':
    parser = argparse.ArgumentParser()
    parser.add_argument('filename', nargs=1, type=str)
    args = parser.parse_args()

    with tables.open_file(args.filename[0], 'r') as data:
        fig = plt.figure()
        ax = fig.add_subplot(1, 1, 1)
        ax.plot(data.root.rewards)
        plt.ioff()
        plt.show()

{'fraction_non_alphanumeric': 0.12761506276150628, 'fraction_numerical': 0.010460251046025104, 'mean_word_length': 3.2389380530973453, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3569077', 'n_tokens_mistral': 163, 'n_tokens_neox': 160, 'n_words': 34}