e79449afe45f4da6f1756a7d92bdd3cd6618c638,qanta/buzzer/util.py,,process_question,#Any#Any#Any#,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

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(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

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: eriklindernoren/PyTorch-YOLOv3
Commit Name: bc4dfbcc2ecae4b3a4bedc2bd18909a9208c05cb
Time: 2018-06-01
Author: eriklindernoren@gmail.com
File Name: train.py
Class Name:
Method Name:


Project Name: open-mmlab/mmcv
Commit Name: 34ee69e0f6ddf5cde7127f6727af7f7d4a3e255c
Time: 2020-07-17
Author: drcut@users.noreply.github.com
File Name: mmcv/ops/nms.py
Class Name:
Method Name: nms


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 20531f89eef9ee5e5248203351fe98241825397e
Time: 2019-10-04
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAFetch/QATdx.py
Class Name:
Method Name: QA_fetch_get_bond_min