PlusLabNLP / EventPlus

[NAACL'21 Demo] EventPlus: a temporal event understanding pipeline that integrates various state-of-the-art event understanding components including event trigger and type detection, event argument detection, event duration and temporal relation extraction
https://kairos-event.isi.edu
Apache License 2.0
26 stars 13 forks source link

AttributeError: 'Elmo' object has no attribute 'batch_to_embeddings' #10

Open TianhaoFu opened 1 year ago

TianhaoFu commented 1 year ago

File "main.py", line 50, in response_pred json_list = durationAPI.pred(events) File "../Duration/inference_api.py", line 84, in pred outputs = compute_predictions(self.model, test_loader) File "/home/tianhao/anaconda3/envs/event-pipeline/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 49, in decorate_no_grad return func(*args, *kwargs) File "../Duration/utils_duration.py", line 40, in compute_predictions p1_dur, p2_dur, fine, rel = model(words, span, root) File "/home/tianhao/anaconda3/envs/event-pipeline/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call result = self.forward(input, **kwargs) File "/home/tianhao/relation_extraction/EventPlus/component/Duration/scripts/src/factslab/factslab/pytorch/temporalmodule.py", line 241, in forward inputs, masks = self.elmo_class.batch_to_embeddings(structures) File "/home/tianhao/anaconda3/envs/event-pipeline/lib/python3.7/site-packages/torch/nn/modules/module.py", line 576, in getattr type(self).name, name)) AttributeError: 'Elmo' object has no attribute 'batch_to_embeddings'