3ce15cf0b1b83503d0a35a0077cb93322c2cc710,finetune/base.py,BaseModel,_inference,#BaseModel#Any#Any#,239
Before Change
predictions = [None] * n
for i in range(n):
y = next(self._predictions)
y = y[mode] if mode else y
predictions[i] = y
return predictions
After Change
def _inference(self, Xs, mode=None):
Xs = self.input_pipeline._format_for_inference(Xs)
if self._cached_predict:
return self._cached_inference(Xs=Xs, mode=mode)
else:
estimator = self.get_estimator()
input_fn = self.input_pipeline.get_predict_input_fn(Xs)
length = len(Xs) if not callable(Xs) else None
predictions = tqdm.tqdm(
estimator.predict(
input_fn=input_fn, predict_keys=mode
),
total=length,
desc="Inference"
)
return [pred[mode] if mode else pred for pred in predictions]
def fit(self, *args, **kwargs):
An alias for finetune.
return self.finetune(*args, **kwargs)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances
Project Name: IndicoDataSolutions/finetune
Commit Name: 3ce15cf0b1b83503d0a35a0077cb93322c2cc710
Time: 2018-11-13
Author: madison@indico.io
File Name: finetune/base.py
Class Name: BaseModel
Method Name: _inference
Project Name: biolab/orange3
Commit Name: f90f104c5eaf23ec26e891eec928229ebb27ad85
Time: 2016-07-29
Author: kerncece@gmail.com
File Name: Orange/widgets/data/owmergedata.py
Class Name: OWMergeData
Method Name: setDataB
Project Name: biolab/orange3
Commit Name: f90f104c5eaf23ec26e891eec928229ebb27ad85
Time: 2016-07-29
Author: kerncece@gmail.com
File Name: Orange/widgets/data/owmergedata.py
Class Name: OWMergeData
Method Name: setDataA
Project Name: snipsco/snips-nlu
Commit Name: be5b7adef5a75a8db9af53c641cf6e2233fb2832
Time: 2017-04-12
Author: clement.doumouro@snips.ai
File Name: snips_nlu/slot_filler/data_augmentation.py
Class Name:
Method Name: get_noise_iterator