Squad dataset has multiple answers to a question.
https://github.com/huggingface/pytorch-pretrained-BERT/blob/3ba5470eb85464df62f324bea88e20da234c423f/examples/run_squad.py#L143

The confusing part here is that in line 146, only the first answer is considered, so I am wondering why is there a check for multiple answers before.
Also, SQuad dataset has multiple answers for the same question. Is this by design or am I fundamentally missing something?
Hi,
In `train-v2.0.json`, there is only one answer for the question.
In `dev-v2.0.json` and hidden `test-v2.0.json`, there are several answers for a given question.
I think the code that you mentioned is designed for not mistakenly using `dev-v2.0.json` for training. If you are going to use your own data or other types of data that has multiple answers, you can simply comment out this part.

Best<|||||>Hello @ymcui ,

I did exactly that, thank you for confirming. Just wanted to be sure that there are no other implications. You are right, I have converted our dataset into SQuAD form and using that with the model. 

Regards,
Nischal