c9dc55111e8fdf4ab89cdd7976b17b7336bb2770,benchmark.py,,,#,53

Before Change



if __name__ == "__main__":

    experiments = {
        "client_batch_size": [1, 4, 16, 64, 256, 1024, 4096, 8192, 16384],
        "max_batch_size": [32, 64, 128, 256, 512, 1024],
        "max_seq_len": [16, 32, 64, 128, 256, 512],
        "num_client": [1, 2, 4, 8, 16, 32, 64, 128],
        "pooling_layer": [[-j] for j in range(1, 13)]
    }

    fp = open("benchmark-%d-fp16-%s.result" % (common["num_worker"], common["fp16"]), "w")
    for var_name, var_lst in experiments.items():
        // set common args

After Change


        for i, j in zip(var_lst, avg_speed):
            fp.write("|%s|%d|\n" % (i, j))
            fp.flush()
        fp.write("\n")
    fp.close()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: hanxiao/bert-as-service
Commit Name: c9dc55111e8fdf4ab89cdd7976b17b7336bb2770
Time: 2019-01-21
Author: hanhxiao@tencent.com
File Name: benchmark.py
Class Name:
Method Name:


Project Name: OpenNMT/OpenNMT-py
Commit Name: 63871d5ab3301d015805abddd8f4259680d6a24a
Time: 2017-09-21
Author: bpeters@coli.uni-saarland.de
File Name: translate.py
Class Name:
Method Name: main


Project Name: dmlc/gluon-nlp
Commit Name: 5ea0c27f524a3e684d9a2e6f012e30e6da2de8aa
Time: 2019-06-18
Author: linhaibin.eric@gmail.com
File Name: scripts/bert/finetune_classifier.py
Class Name:
Method Name: test


Project Name: streamlit/streamlit
Commit Name: a9ec1a8df7bbfd99d1e166fe5d72bafcc23c915b
Time: 2018-02-03
Author: adrien.g.treuille@gmail.com
File Name: periodic_table.py
Class Name:
Method Name: