chiayewken / Span-ASTE

Code Implementation of "Learning Span-Level Interactions for Aspect Sentiment Triplet Extraction".
MIT License
169 stars 45 forks source link

I installed the package according to the requirements. I wanted to use the pre trained model to make predictions, but it failed to run. #35

Closed SiriusXT closed 2 years ago

SiriusXT commented 2 years ago

I installed the package according to the requirements. I wanted to use the pre trained model to make predictions, but it failed to run. Two error was reported: 1. allennlp.common.checks.ConfigurationError: Extra parameters passed to SpanModel: {'relation_head_type': 'proper', 'use_bilstm_after_embedder': False, 'use_double_mix_embedder': False, 'use_ner_embeds': False} Traceback (most recent call last): File "X:\workspace\python\papercode\@aspect\Span-ASTE\aste\test.py", line 4, in model.predict('test.txt', "pred.txt") File "X:\workspace\python\papercode\@aspect\Span-ASTE\aste\wrapper.py", line 83, in predict with open(path_temp_out) as f: 2. FileNotFoundError: [Errno 2] No such file or directory: 'X:\workspace\python\papercode\@aspect\Span-ASTE\pretrained_dir\temp_data\pred_out.json'

chiayewken commented 2 years ago

Thank you for raising this error, I have updated the pretrained weights and demo notebooks, please git pull to latest commit and try again

SiriusXT commented 2 years ago

Thanks, according to the new pre training model, it has been successfully run.