b274db161929f34024c254dc5b78603abbeb855a,service/server.py,BertSink,run,#BertSink#,135

Before Change


            print(len(resp))
            for j in resp:
                print(j)
                input()


class BertWorker(Process):
    def __init__(self, id, args):

After Change


        while not self.exit_flag.is_set():
            msg = self.receiver.recv_multipart()
            client_id = msg[0]
            arr_info, arr_val = jsonapi.loads(msg[2]), msg[4]
            X = np.frombuffer(memoryview(arr_val), dtype=arr_info["dtype"])
            X = X.reshape(arr_info["shape"])
            self.logger.info("received %s of client %s" % (X.shape, client_id))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


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: mittagessen/kraken
Commit Name: 1371ed1b518e5782cb21e9c4d8cb3d6d213b6b5b
Time: 2018-01-16
Author: mittagessen@l.unchti.me
File Name: kraken/lib/vgsl.py
Class Name: TransposedSummarizingRNN
Method Name: get_shape


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