You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I'm parsing a sentence that is too long, I get the following error (this stack trace is for SDP parsing, but it also breaks EDS and UCCA):
Traceback (most recent call last):
File "~/miniconda3/envs/parsing/bin/allennlp", line 8, in <module>
sys.exit(run())
File "~/miniconda3/envs/parsing/lib/python3.7/site-packages/allennlp/run.py", line 18, in run
main(prog="allennlp")
File "~/miniconda3/envs/parsing/lib/python3.7/site-packages/allennlp/commands/__init__.py", line 102, in main
args.func(args)
File "~/miniconda3/envs/parsing/lib/python3.7/site-packages/allennlp/commands/predict.py", line 227, in _predict
manager.run()
File "~/miniconda3/envs/parsing/lib/python3.7/site-packages/allennlp/commands/predict.py", line 206, in run
for model_input_json, result in zip(batch_json, self._predict_json(batch_json)):
File "~/miniconda3/envs/parsing/lib/python3.7/site-packages/allennlp/commands/predict.py", line 151, in _predict_json
results = [self._predictor.predict_json(batch_data[0])]
File "~/miniconda3/envs/parsing/lib/python3.7/site-packages/allennlp/predictors/predictor.py", line 65, in predict_json
return self.predict_instance(instance)
File "./utils/transition_sdp_predictor.py", line 43, in predict_instance
outputs = self._model.forward_on_instance(instance)
File "~/miniconda3/envs/parsing/lib/python3.7/site-packages/allennlp/models/model.py", line 124, in forward_on_instance
return self.forward_on_instances([instance])[0]
File "~/miniconda3/envs/parsing/lib/python3.7/site-packages/allennlp/models/model.py", line 153, in forward_on_instances
outputs = self.decode(self(**model_input))
File "~/miniconda3/envs/parsing/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in __call__
result = self.forward(*input, **kwargs)
File "./modules/transition_parser_sdp2015.py", line 331, in forward
embedded_text_input=embedded_text_input)
File "./modules/transition_parser_sdp2015.py", line 150, in _greedy_decode
input=embedded_text_input[sent_idx][sent_len[sent_idx] - 1 - token_idx],
IndexError: index 428 is out of bounds for dimension 0 with size 390
Does this package support generating a "partial" graph for long sequences, or are long sequences not supported at all? If I change the if statement to the following, would the resulting graph be a valid partial graph?
if sent_len[sent_idx] > token_idx and sent_len[sent_idx] - 1 - token_idx < embedded_text_input.shape[1]:
The text was updated successfully, but these errors were encountered:
When I'm parsing a sentence that is too long, I get the following error (this stack trace is for SDP parsing, but it also breaks EDS and UCCA):
This is from https://github.com/DreamerDeo/HIT-SCIR-CoNLL2019/blob/9bc3c0727c13aac72e71ae7bf48cc195f481bffa/modules/transition_parser_sdp2015.py#L146-L151
Does this package support generating a "partial" graph for long sequences, or are long sequences not supported at all? If I change the if statement to the following, would the resulting graph be a valid partial graph?
The text was updated successfully, but these errors were encountered: