def evaluate_dev_sets(epoch, model, the_data, dev_metrics_df):
    for (dev_steps, dev_set_name, dev_generator) in the_data.get_dev_generators():
        sys.stdout.write('.')
        dev_metrics = model.evaluate_generator(generator=dev_generator, steps=dev_steps)
        dev_metrics_df.loc[((epoch - 1), (dev_set_name, model.metrics_names))] = dev_metrics
    sys.stdout.write('\n')
    print('dev metrics:\n{}'.format(dev_metrics_df.loc[(epoch - 1)]))
def evaluate_dev_sets(epoch, model, the_data, dev_metrics_df):
    for (dev_steps, dev_set_name, dev_generator) in the_data.get_dev_generators():
        sys.stdout.write('.')
        dev_metrics = model.evaluate_generator(generator=dev_generator, steps=dev_steps)
        dev_metrics_df.loc[((epoch - 1), (dev_set_name, model.metrics_names))] = dev_metrics
    sys.stdout.write('\n')
    print('dev metrics:\n{}'.format(dev_metrics_df.loc[(epoch - 1)]))