dwadden/dygiepp

question about Making predictions on a new dataset

hustcxx opened this issue · 1 comments

I make predictions ona new dataset (no labeled )called cnn dataset with a pretrained model(ace05-relation).
I format the dataset with "python scripts/data/new-dataset/format_new_dataset.py" .But the program raise NotImplementedError.
Does anyone know the exact reason?

command like follow:
allennlp predict ./pretrain/ace05-relation.tar.gz ./output/cnn.jsonl --predictor dygie --include-package dygie --output-file ./outputpath/cnn.json --cuda-device 0

Error message:
Traceback (most recent call last):
File "/home/cxx/anaconda3/envs/python37/bin/allennlp", line 8, in
sys.exit(run())
File "/home/cxx/anaconda3/envs/python37/lib/python3.7/site-packages/allennlp/main.py", line 34, in run
main(prog="allennlp")
File "/home/cxx/anaconda3/envs/python37/lib/python3.7/site-packages/allennlp/commands/init.py", line 92, in main
args.func(args)
File "/home/cxx/anaconda3/envs/python37/lib/python3.7/site-packages/allennlp/commands/predict.py", line 226, in _predict
manager.run()
File "/home/cxx/anaconda3/envs/python37/lib/python3.7/site-packages/allennlp/commands/predict.py", line 198, in run
for model_input_json, result in zip(batch_json, self._predict_json(batch_json)):
File "/home/cxx/anaconda3/envs/python37/lib/python3.7/site-packages/allennlp/commands/predict.py", line 144, in _predict_json
results = [self._predictor.predict_json(batch_data[0])]
File "/home/cxx/anaconda3/envs/python37/lib/python3.7/site-packages/allennlp/predictors/predictor.py", line 48, in predict_json
instance = self._json_to_instance(inputs)
File "/home/cxx/anaconda3/envs/python37/lib/python3.7/site-packages/allennlp/predictors/predictor.py", line 208, in _json_to_instance
raise NotImplementedError
NotImplementedError

oh,I solved the problem above.