0489238f5b5db28a6a6d3bcb13406f20e9749d79,clairvoyante/predict.py,,Test,#Any#Any#,23

Before Change


    call_fh = open(args.call_fn, "w")
    predictStart = time.time()
    predictBatchSize = param.predictBatchSize
    for i in range(0, total, predictBatchSize):
        XBatch, _, _ = utils.DecompressArray(XArrayCompressed, i, predictBatchSize, total)
        posBatch, _, _ = utils.DecompressArray(posArrayCompressed, i, predictBatchSize, total)
        base, t = m.predict(XBatch)
        for j in range(len(base)):
            print >> call_fh, posBatch[j], np.argmax(base[j]), np.argmax(t[j])
    logging.info("Prediciton time elapsed: %.2f s" % (time.time() - predictStart))


if __name__ == "__main__":

After Change


    predictStart = time.time()
    for num, XBatch, posBatch in utils.GetTensor( args.tensor_fn, param.predictBatchSize ):
        base, t = m.predict(XBatch)
        if num != len(base):
            sys.exit("Inconsistent shape between input tensor and output predictions %d/%d" % (num, len(base)))
        for j in range(len(base)):
            print >> call_fh, posBatch[j], np.argmax(base[j]), np.argmax(t[j])
    logging.info("Prediciton time elapsed: %.2f s" % (time.time() - predictStart))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: aquaskyline/Clairvoyante
Commit Name: 0489238f5b5db28a6a6d3bcb13406f20e9749d79
Time: 2017-07-31
Author: rluo5@jhu.edu@schatz-bigmem.cm.cluster
File Name: clairvoyante/predict.py
Class Name:
Method Name: Test


Project Name: automl/SMAC3
Commit Name: 8b93c479bdd284b6377bea771c0f8d1495a58f42
Time: 2016-01-08
Author: lindauer@informatik.uni-freiburg.de
File Name: smac/smbo/smbo.py
Class Name: SMBO
Method Name: run


Project Name: xinntao/BasicSR
Commit Name: 29ab5e1965503be3ffe87462e973edf1d457af6e
Time: 2018-09-06
Author: wxt1994@126.com
File Name: codes/scripts/extract_subimgs_single.py
Class Name:
Method Name: main


Project Name: ray-project/ray
Commit Name: 20ef4a860325d1735df038d4e4b8c7de5e013ed3
Time: 2020-03-11
Author: sven@anyscale.io
File Name: rllib/tests/test_avail_actions_qmix.py
Class Name:
Method Name: