e79449afe45f4da6f1756a7d92bdd3cd6618c638,qanta/buzzer/util.py,,process_question,#,86
Before Change
q_group = sorted(q_group.items(), key=lambda x: x[0])
word_positions, guesses = list(map(list, zip(*q_group)))
// each entry is a list of (guess, logit, prob) sorted by logit
labels = np.array([int(g[0][0] == answer) for g in guesses], dtype=np.int32)
vectors = vector_converter(guesses)
return qid, vectors, labels, word_positions
def read_data(
After Change
// labels = np.array([int(g[0][0] == answer) for g in guesses], dtype=np.int32)
// vectors = vector_converter(guesses)
q_rows = q_rows.groupby("char_index")
q_rows = q_rows.apply(lambda x: x.sort_values("score"))
return qid, vectors, labels, word_positions
def read_data(
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: Pinafore/qb
Commit Name: e79449afe45f4da6f1756a7d92bdd3cd6618c638
Time: 2018-04-25
Author: sjtufs@gmail.com
File Name: qanta/buzzer/util.py
Class Name:
Method Name: process_question
Project Name: has2k1/plotnine
Commit Name: 666b01f0a3c060be93b804b27814af58e1e50aac
Time: 2020-03-21
Author: has2k1@gmail.com
File Name: plotnine/aes.py
Class Name:
Method Name: reorder
Project Name: eriklindernoren/PyTorch-YOLOv3
Commit Name: bc4dfbcc2ecae4b3a4bedc2bd18909a9208c05cb
Time: 2018-06-01
Author: eriklindernoren@gmail.com
File Name: train.py
Class Name:
Method Name: