Skip to content

Commit

Permalink
Merge pull request #3524 from westfish/qg-example
Browse files Browse the repository at this point in the history
fix prediction bug in qg example
  • Loading branch information
westfish authored Oct 20, 2022
2 parents 8f3e4e5 + 39b49c9 commit e144877
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions examples/question_generation/unimo-text/gen_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,7 @@ def convert_example(example,
index_list[0]) + [3] * (index_list[4] - index_list[1]) + [0] * (
index_list[6] - index_list[4]) + [1] * (
len(tokenized_example['input_ids']) - index_list[6])
assert ('target' in example
and example['target']) or ('question' in example
and example['question']), example

if 'target' in example and example['target']:
tokenized_example['target'] = example['target']
elif 'question' in example and example['question']:
Expand Down

0 comments on commit e144877

Please # to comment.