e6bcba74677efcc31d1e49eba690caa8e0686966,finetune/target_models/deployment_model.py,DeploymentModel,predict,#DeploymentModel#Any#Any#Any#,141

Before Change



        if self._predictions is not None:
            self._clear_prediction_queue()
        print(preds)
        return self.input_pipeline.label_encoder.inverse_transform(np.asarray(preds))


    def predict_proba(self, X):

After Change


        self.target_est = self.get_estimator("target")
        preds = None
        if features is not None:
            target_est = self.get_estimator("target")
            target_fn = self.input_pipeline.get_target_input_fn(features)
            preds = target_est.predict(
                    input_fn=target_fn, predict_keys=mode, hooks=[self.predict_hooks.target_hook])
            preds = [pred[mode] if mode else pred for pred in preds]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: IndicoDataSolutions/finetune
Commit Name: e6bcba74677efcc31d1e49eba690caa8e0686966
Time: 2019-06-20
Author: matthew.bayer@indico.io
File Name: finetune/target_models/deployment_model.py
Class Name: DeploymentModel
Method Name: predict


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: run


Project Name: IndicoDataSolutions/finetune
Commit Name: 0f16b9633dff0fa8044ea2f38b97dbef8814b801
Time: 2019-06-20
Author: matthew.bayer@indico.io
File Name: finetune/target_models/deployment_model.py
Class Name: DeploymentModel
Method Name: predict