517c81db14d146a5e740ca5cca9177d9f9c30d8f,python/baseline/services.py,ClassifierService,predict,#ClassifierService#Any#Any#Any#,201
Before Change
}
outcomes_list = self.model.predict(examples)
results = []
for outcomes in outcomes_list:
if self.return_labels:
results += [list(map(lambda x: (x[0], x[1].item()), sorted(outcomes, key=lambda tup: tup[1], reverse=True)))]
else:
results += [list(map(lambda x: (self.label_vocab[x[0].item()], x[1].item()),
sorted(outcomes, key=lambda tup: tup[1], reverse=True)))]
return results
@exporter
class EmbeddingsService(Service):
@classmethod
After Change
}
outcomes_list = self.model.predict(examples)
return self.format_output(outcomes_list)
def format_output(self, predicted):
results = []
for outcomes in predicted:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: dpressel/mead-baseline
Commit Name: 517c81db14d146a5e740ca5cca9177d9f9c30d8f
Time: 2019-11-15
Author: blester125@gmail.com
File Name: python/baseline/services.py
Class Name: ClassifierService
Method Name: predict
Project Name: dpressel/mead-baseline
Commit Name: 517c81db14d146a5e740ca5cca9177d9f9c30d8f
Time: 2019-11-15
Author: blester125@gmail.com
File Name: python/baseline/services.py
Class Name: TaggerService
Method Name: predict
Project Name: dpressel/mead-baseline
Commit Name: 517c81db14d146a5e740ca5cca9177d9f9c30d8f
Time: 2019-11-15
Author: blester125@gmail.com
File Name: python/baseline/services.py
Class Name: ClassifierService
Method Name: predict
Project Name: dpressel/mead-baseline
Commit Name: 517c81db14d146a5e740ca5cca9177d9f9c30d8f
Time: 2019-11-15
Author: blester125@gmail.com
File Name: python/baseline/services.py
Class Name: EncoderDecoderService
Method Name: predict