def extract_from_summary(path, value_tag):
    ''' Extracts values and wall times from tensorboard summaries
    '''
    if os.path.isdir(path):
        path = glob.glob(os.path.join(path, "*"))[0]

    origin_wall_time = None
    wall_times = []
    values = []

    for event in tf.compat.v1.train.summary_iterator(path):
        if not origin_wall_time:
            origin_wall_time = event.wall_time
        for value in event.summary.value:
            if value.tag == value_tag:
                wall_times.append(event.wall_time - origin_wall_time)
                values.append(value.simple_value)
    return wall_times, values
 Extracts values and wall times from tensorboard summaries
    
make_figures.py