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

How can I use this model to predict my dataset? #22

Open
YouseYeung opened this issue Nov 25, 2017 · 0 comments
Open

How can I use this model to predict my dataset? #22

YouseYeung opened this issue Nov 25, 2017 · 0 comments

Comments

@YouseYeung
Copy link

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!

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

No branches or pull requests

1 participant