Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add (M)Luke model training for Token Classification in the examples #14880

Merged
merged 24 commits into from
Jan 31, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix true label tags
  • Loading branch information
jplu committed Jan 26, 2022
commit 3a09d367cee9101b20f8b908583754adb271de08
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ def get_luke_labels(outputs, ner_tags, original_entity_spans):
predicted_sequence[span[0] + 1 : span[1]] = [label] * (span[1] - span[0] - 1)

true_predictions.append(predicted_sequence)
true_labels.append([label_list[tag_id] for tag_id in ner_tags])
true_labels.append([label_list[tag_id] for tag_id in tags])

return true_predictions, true_labels

Expand Down