-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Training of FARMReader uses too many and potentially wrong no answer labels due to bug in SquadProcessor #2771
Comments
Hi @julian-risch it sounds like we agree that we would like to have control over how many no-answer labels are created during training in a FARMReader model, so the implementation of something like In regards to evaluation, the issue outlined here does not affect evaluation because it was determined that evaluation does aggregate results per file which is why Michel closed the issue #2622. |
Additionally, we also agreed that adding additional documentation to the FARMReader training to explain how no-answer labels are automatically generated would be very helpful. |
Alright, thank you. I'll tag @brandenchan and @agnieszka-m so that they also learn about the needed documentation update . |
Describe the bug
When training a QA model with the
FARMReader.train()
method, theSquadProcessor
will be used to convert the SQuAD-style json file to training samples.The context for a question might be longer than the model's token limit. Therefore, the processor splits the full context into smaller passages. It then checks, if the original answer is present in a passage using its character positions. If the answer is not present in the passage it automatically uses the sample as a
no-answer
sample.The code is here:
haystack/haystack/modeling/data_handler/processor.py
Line 643 in a2905d0
This creates multiple issues:
Expected behavior
max_no_answer_per_context
where they can decide how many no-answer samples should be created.The text was updated successfully, but these errors were encountered: