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

Fix/missing truncation bug #679

Merged
merged 2 commits into from Jan 7, 2021
Merged

Fix/missing truncation bug #679

merged 2 commits into from Jan 7, 2021

Conversation

julian-risch
Copy link
Member

The tokenizer's call of the tokenize_batch_question_answering method caused warnings of untruncated input sequences. These warnings are now ignored because the encoded sequences are processed in strides afterward and truncation is therefore not needed.

Further, an input validation step for QA data had a bug where whitespaces were not correctly handled when comparing gold label texts with texts at the start/end indices. Leading and trailing whitespaces are now ignored

#673

Julian Risch added 2 commits January 7, 2021 11:06
Comparison of gold label answers and answers defined by start/end indices does not consider leading and trailing whitespaces anymore
There was a warning about too long input sequences, which is now surpressed. The encoded sequences are processed with striding afterward. Encoded sequences are not passed in full length to the model and therefore do not cause problems.
Copy link
Contributor

@Timoeller Timoeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.
Still there might be a logging bug on transformer side that we should investigate.

farm/modeling/tokenization.py Show resolved Hide resolved
@Timoeller Timoeller self-requested a review January 7, 2021 15:26
Copy link
Contributor

@Timoeller Timoeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG

@Timoeller Timoeller merged commit 42af265 into master Jan 7, 2021
@Timoeller Timoeller deleted the fix/missing_truncation_bug branch January 11, 2021 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants