b274db161929f34024c254dc5b78603abbeb855a,service/server.py,BertSink,run,#BertSink#,135
Before Change
while not self.exit_flag.is_set():
resp = self.receiver.recv_multipart()
print(len(resp))
for j in resp:
print(j)
input()
class BertWorker(Process):
def __init__(self, id, args):
super().__init__()
self.model_dir = args.model_dir
After Change
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))
class BertWorker(Process):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
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: 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: 12d7327999fd359419f64f75c73ae7e5c8f56a42
Time: 2018-11-13
Author: hanhxiao@tencent.com
File Name: service/server.py
Class Name: BertServer
Method Name: run