129f293bc8e87ded5f3a4300b65e643b5e5ef9f0,benchmark.py,,,#,43

Before Change



        avg_speed = []
        for var in var_lst:
            args = {k: v for k, v in common.items()}
            args[var_name] = var
            args_cmd = ["-%s=%s" % (k, v) for k, v in args.items()]
            // override exp args
            server = BertServer(arg_p.parse_args(args_cmd))
            server.start()

After Change


        "max_batch_size": 256,
        "num_client": 1,
        "pooling_strategy": PoolingStrategy.REDUCE_MEAN,
        "pooling_layer": [-2],
        "gpu_memory_fraction": 0.5,
        "xla": False,
    }
    experiments = {
        "client_batch_size": [1, 4, 8, 16, 64, 256, 512, 1024, 2048, 4096],
        "max_batch_size": [32, 64, 128, 256, 512],
        "max_seq_len": [20, 40, 80, 160, 320],
        "num_client": [2, 4, 8, 16, 32],
        "pooling_layer": [[-j] for j in range(1, 13)]
    }

    fp = open("benchmark-%d.result" % common["num_worker"], "w")
    for var_name, var_lst in experiments.items():
        // set common args
        args = namedtuple("args_namedtuple", ",".join(common.keys()))
        for k, v in common.items():
            setattr(args, k, v)

        avg_speed = []
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: hanxiao/bert-as-service
Commit Name: 129f293bc8e87ded5f3a4300b65e643b5e5ef9f0
Time: 2018-12-15
Author: hanhxiao@tencent.com
File Name: benchmark.py
Class Name:
Method Name:


Project Name: OpenMined/PySyft
Commit Name: 5efaf25f5499c7065f1c37bfd4288159714406d8
Time: 2020-08-12
Author: vova@promail.spb.ru
File Name: src/syft/lib/torch/uppercase_tensor.py
Class Name:
Method Name:


Project Name: hanxiao/bert-as-service
Commit Name: 2bfe5bfcec7759ae022b1a479411aa7d1b8401f1
Time: 2019-05-06
Author: zyn2122@gmail.com
File Name: example/example7.py
Class Name:
Method Name: