2eeb31084a08f1f5e2d73ccb2f0a930014724192,service/client.py,BertClient,get_server_config,#BertClient#,30

Before Change


        self.socket.send(b"SHOW_CONFIG")
        response = self.socket.recv_multipart()
        print("the server at %s:%d has the following conifgs: " % (self.ip, self.port))
        print(response)
        print("you should not see this message multiple times! "
              "for efficiency reason, please move "BertClient()" out of the loop.")

    def encode(self, texts):

After Change


        self.socket.send(b"SHOW_CONFIG")
        response = self.socket.recv_multipart()
        print("the server at %s:%d has the following conifgs: " % (self.ip, self.port))
        for k, v in jsonapi.loads(response):
            print("%30s\t=\t%30s" % (k, v))
        print("you should NOT see this message multiple times! "
              "if you see it repeatedly appear, "
              "please consider moving "BertClient()" out of the loop.")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: hanxiao/bert-as-service
Commit Name: 2eeb31084a08f1f5e2d73ccb2f0a930014724192
Time: 2018-11-14
Author: hanhxiao@tencent.com
File Name: service/client.py
Class Name: BertClient
Method Name: get_server_config


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