166cb2c804d081401f0efb52745d214fa633fae1,qanta/guesser/elasticsearch.py,ElasticSearchGuesser,guess,#ElasticSearchGuesser#Any#Any#,38
Before Change
def guess(self,
questions: List[QuestionText],
max_n_guesses: Optional[int]):
predictions = []
pool = Pool(processes=conf["guessers"]["ElasticSearch"]["n_cores"])
for guesses in pool.starmap(es_search,
zip(repeat(max_n_guesses), questions), chunksize=1000):
predictions.append(guesses)
After Change
def es_search(query):
return es_index.search(query)[:max_n_guesses]
return sc.parallelize(questions, 4 * n_cores).map(es_search).collect()
@classmethod
def targets(cls):
return []
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: Pinafore/qb
Commit Name: 166cb2c804d081401f0efb52745d214fa633fae1
Time: 2017-04-13
Author: ski.rodriguez@gmail.com
File Name: qanta/guesser/elasticsearch.py
Class Name: ElasticSearchGuesser
Method Name: guess
Project Name: kk7nc/RMDL
Commit Name: 16f50016cabab22efde6f183c89efe0a11b0c683
Time: 2018-03-07
Author: kk7nc@virginia.edu
File Name: src/RMDL_Image.py
Class Name:
Method Name: image_classifciation
Project Name: pymc-devs/pymc3
Commit Name: 13831dd959789127f9735275757f1d660de22b82
Time: 2017-09-02
Author: maxim.v.kochurov@gmail.com
File Name: pymc3/variational/stein.py
Class Name: Stein
Method Name: dlogp