Пример #1
0
def get_number_episodes_completed(benchmark_log_name):
    """ Get the number of episodes that where completed"""
    control_dict = read_summary_csv(
        os.path.join(benchmark_log_name, 'summary.csv'))
    if control_dict is None:
        return None
    try:
        return sum(control_dict['result'])
    except:
        return sum(control_dict['resul'])
Пример #2
0
def get_episode_number(benchmark_log_name):
    """ Get the current episode"""

    control_dict = read_summary_csv(
        os.path.join(benchmark_log_name, 'summary.csv'))
    if control_dict is None:
        return None

    # TODO: weird bug on data reading that eats the last letter
    try:
        return len(control_dict['result'])
    except:
        return len(control_dict['resul'])