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

READER can answer "there is no answer" but not all models do #609

Merged
merged 2 commits into from Nov 20, 2020
Merged

READER can answer "there is no answer" but not all models do #609

merged 2 commits into from Nov 20, 2020

Conversation

guillim
Copy link
Contributor

@guillim guillim commented Nov 19, 2020

No description provided.

Allow a new option from the settings : tell is a reader model can return a "no answer" like SQuAD2.0 models, or if it's only a  SQuAD1.0-like model, always giving an answer.
@guillim
Copy link
Contributor Author

guillim commented Nov 19, 2020

This PR simply suggest a new option for allowing SQuAD 1.0 like - model to be better configured into Haystack.

I have to say I struggled to understand why some of my returned answer array where partially empty. After some digging, I understood that default behavior was "READER SQuAD2.0" format. But that's not always the case, which explains this PR.

@tholor
Copy link
Member

tholor commented Nov 20, 2020

Good point. Thanks for raising the PR!
Did you also experience that with the FARMReader when loading a SQuAD 1.0 model? If yes, we should probably add a similar flag there, too. From our experience, the model in these cases simply never predicts a no_answer (start=0, end=0), but we also mostly use SQuAD 2 models so our experience here is limited.

@guillim
Copy link
Contributor Author

guillim commented Nov 20, 2020

I have to say, I never used FARMReader (at least yet) 🥴 so I cannot tell you more on this side.
I understand that you probably missed it since SQuAD2.0 are the most common, but on our side (https://huggingface.co/etalab-ia/camembert-base-squadFR-fquad-piaf) we are using a SQuAD1.0 style model.

@tholor
Copy link
Member

tholor commented Nov 20, 2020

Ok got it. Then let's merge this one for now and investigate it separately for FARMReader.

I would still recommend giving FARMReader a try at some point - it should be a bit faster, often gives slightly better results and you can load the same models from model hub (no conversion needed) :)

@tholor tholor merged commit 65cf954 into deepset-ai:master Nov 20, 2020
@guillim guillim deleted the patch-1 branch November 20, 2020 13:22
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