e4488b9b68416439a226b48b74c22ae84c129db1,magpie/api.py,,batch_train,#Any#Any#Any#Any#Any#Any#Any#Any#,278

Before Change


        batch_number = 0
        if verbose:
            sys.stdout.write(b"Batches: ")
            sys.stdout.flush()
        while not no_more_samples:
            batch_number += 1

            batch = []

After Change


        if verbose:
            print(" {0:.2f}s".format(time.clock() - epoch_start))

        metrics = batch_test(model=model, ontology=ontology, verbose=False)

        for k, v in metrics.iteritems():
            print("{0}: {1}".format(k, v))

        if metrics["f1"] > previous_best:
            previous_best = metrics["f1"]
            save_to_disk(model_path, model, overwrite=True)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: inspirehep/magpie
Commit Name: e4488b9b68416439a226b48b74c22ae84c129db1
Time: 2016-02-10
Author: jan.stypka@cern.ch
File Name: magpie/api.py
Class Name:
Method Name: batch_train


Project Name: tensorflow/minigo
Commit Name: 338e1914ab7e73856d292b7b1f2885016db7e4ff
Time: 2018-05-09
Author: tom.ej.madams@gmail.com
File Name: main.py
Class Name:
Method Name: gtp


Project Name: awslabs/mxboard
Commit Name: 80ee73a8084702d5522dce74c617e9fde6d17ced
Time: 2018-04-30
Author: wujun.nju@gmail.com
File Name: python/mxboard/writer.py
Class Name: SummaryWriter
Method Name: flush