9db1c1d7060f26f3d871d72d5a5690c073d67ade,service/server.py,BertServer,run,#BertServer#,47

Before Change


                worker, _, client = request[:3]
                free_a_worker(worker)
                if client != b"READY" and len(request) > 3:
                    for j in request:
                        print(j)
                        input()
                    _, reply = request[3:]
                    finish_jobs[client].append(pickle.loads(reply))
                else:
                    poller.register(self.frontend, zmq.POLLIN)

After Change


                worker, _, client = request[:3]
                free_a_worker(worker)
                if client != b"READY" and len(request) > 3:
                    arr_info, arr_val = jsonapi.loads(request[4]), request[7]
                    X = np.frombuffer(memoryview(arr_val), dtype=arr_info["dtype"])
                    finish_jobs[client].append(X.reshape(arr_info["shape"]))
                else:
                    poller.register(self.frontend, zmq.POLLIN)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: hanxiao/bert-as-service
Commit Name: 9db1c1d7060f26f3d871d72d5a5690c073d67ade
Time: 2018-11-14
Author: hanhxiao@tencent.com
File Name: service/server.py
Class Name: BertServer
Method Name: run


Project Name: hanxiao/bert-as-service
Commit Name: b274db161929f34024c254dc5b78603abbeb855a
Time: 2018-11-15
Author: hanhxiao@tencent.com
File Name: service/server.py
Class Name: BertSink
Method Name: run


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 7abf4d6116fbe397de7012effafce04fd4d53424
Time: 2017-06-08
Author: yutiansut@qq.com
File Name: QUANTAXIS/QABacktest/QAAnalysis.py
Class Name:
Method Name: QA_backtest_calc_benchmark