-
Notifications
You must be signed in to change notification settings - Fork 88
Description
I want to use the model you have built to predict the answer in my dataset.
The content in the file, "dev-v1.1.json", is shown belowed.
{"data": [{"title": "winograd", "paragraphs": [{"context": "If thing A doesn't fit into thing B, A is big and B is small. The trophy doesn't fit into the brown suitcase.", "qas": [{"answers": [{"answer_start": 67, "text": "trophy"}, {"answer_start": 67, "text": "trophy"}, {"answer_start": 67, "text": "trophy"}], "question": "What is big?", "id": "5737aafd1c456719005744ff"}]}]}], "version": "1.1"}
When I use the command, "python parse_data.py data/dev-v1.1.json --outfile data/dev_parsed.json"
I get this file and the content in the file is shown belowed.
[{"answer_start": 67, "question": "What is big?", "topic": "winograd", "context": "If thing A doesn't fit into thing B, A is big and B is small. The trophy doesn't fit into the brown suitcase.", "answer": "trophy", "id": "5737aafd1c456719005744ff", "answer_end": 72}]
And then I use the command "python preprocessing.py data/dev_parsed.json --outfile data/dev_data_str.pkl --include_str". I get a file with six bytes.
At last, I use the command "python predict.py --batch_size 100 --dev_data data/dev_data_str.pkl models/31-t3.05458271443-v3.27696280528.model prediction.json".
I get this error.
Traceback (most recent call last): File "predict.py", line 44, in <module> char_level_embeddings = len(dev_data[0]) is 4 IndexError: list index out of range
My pkl file has the size of six bytes, but why dev_data is empty?
How to fix this problem?
Thanks!