yanaiela / TNE

codebase for the Text-based NP Enrichment (TNE) paper
MIT License
19 stars 5 forks source link

Missing data/test.jsonl file when trying to generate prediction file #3

Open kkaustubh005 opened 1 year ago

kkaustubh005 commented 1 year ago

I'm getting below error while trying to generate the prediction file. Command I used- allennlp predict models/coupled_spanbert_large/model.tar.gz data/test.jsonl --output-file coupled_large_predictions.jsonl --include-package tne --use-dataset-reader --predictor tne_predictor

Error: raise FileNotFoundError(f"file {url_or_filename} not found") FileNotFoundError: file data/test.jsonl not found

yanaiela commented 1 year ago

Hi,

This file doesn't exist indeed. Have a look at the data folder. You probably want to change it into test_unlabeled-v1.1.jsonl (and make sure to unzip that file).

Let me know if you're still having problems.

kkaustubh005 commented 1 year ago

As per your suggestion, I used the modified version of the following command:

allennlp predict models/coupled spanbert large/model.tar.gz data/test unlabeled-v1.1.jsonl coupled large predictions.jsonl —output-file —include-package tne —use-dataset-reader —predictor

I'm still getting the issue listed below, though: File "/home/kkaranjk/project/TNE/tne/modeling/dataset readers/tne reader.py", line 125, in make tne instance for entity id, row in tokenized entities. items(): AttributeError: 'items' is missing from the 'list' object

In addition, I tried using the test_unlabeled.jsonl file with the same command and I was not getting the above-mentioned error with that file.

yanaiela commented 1 year ago

I changed some of the data variables at some point, so that's the mismatch you're seeing. But the content is the same. You should go ahead and use the test_unlabeled version if it works for you (unless you're having other problems with that?)