dd3c13d51975d7ca569681dd19639473d19e8e85,server/bert_serving/server/__init__.py,BertWorker,run1,#BertWorker#,347

Before Change


        receiver = context.socket(zmq.PULL)
        receiver.connect(self.worker_address)

        sink = context.socket(zmq.PUSH)
        sink.connect(self.sink_address)
        for r in estimator.predict(self.input_fn_builder(), yield_single_examples=False):
            send_ndarray(sink, r["client_id"], r["encodes"])
            self.logger.info("job done\tsize: %s\tclient: %s" % (r["encodes"].shape, r["client_id"]))

        receiver.close()
        sink.close()
        context.term()
        self.logger.info("terminated!")

    @staticmethod

After Change


        return Estimator(model_fn=model_fn, config=RunConfig(session_config=config))

    def run1(self):
        print("________")
        os.environ["CUDA_VISIBLE_DEVICES"] = "6"

        import tensorflow as tf
        from tensorflow.python.client import device_lib
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: hanxiao/bert-as-service
Commit Name: dd3c13d51975d7ca569681dd19639473d19e8e85
Time: 2018-12-14
Author: hanhxiao@tencent.com
File Name: server/bert_serving/server/__init__.py
Class Name: BertWorker
Method Name: run1


Project Name: streamlit/streamlit
Commit Name: 01bf5dd323bebd66b7ad60fdaee34eb8f7b76aae
Time: 2018-08-09
Author: armando@playground.global
File Name: lib/streamlit/proxy/Proxy.py
Class Name:
Method Name: _print_remote_url


Project Name: streamlit/streamlit
Commit Name: 883644354ca6c016a9b79d67e0494db88a823c23
Time: 2018-08-14
Author: armando@playground.global
File Name: lib/streamlit/proxy/Proxy.py
Class Name:
Method Name: _print_remote_url


Project Name: hanxiao/bert-as-service
Commit Name: dd3c13d51975d7ca569681dd19639473d19e8e85
Time: 2018-12-14
Author: hanhxiao@tencent.com
File Name: server/bert_serving/server/__init__.py
Class Name: BertWorker
Method Name: run1