-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
I trained the baseline SciREX model, and then tried to make predictions for it, but ran into a problem in the step to predict salient mentions. When I tried running:
python scirex/predictors/predict_salient_mentions.py $scirex_archive $test_output_folder/ner_predictions.jsonl $test_output_folder/salient_mentions_predictions.jsonl $cuda_device
I got the error:
span_ix = span_mask.view(-1).nonzero().squeeze(1).long()
36it [00:02, 15.88it/s]
Traceback (most recent call last):
File "scirex/predictors/predict_salient_mentions.py", line 92, in <module>
main()
File "scirex/predictors/predict_salient_mentions.py", line 88, in main
predict(archive_folder, test_file, output_file, cuda_device)
File "scirex/predictors/predict_salient_mentions.py", line 57, in predict
metadata = output_res['metadata']
KeyError: 'metadata'
It seems that one in every so often, the output of the salient mention prediction decoder is missing the metadata field.
As a stopgap solution, I'm just skipping batches with this issue, but am concerned that I'll accidentally bias my evaluation somehow by doing this.
jeremyadamsfisher
Metadata
Metadata
Assignees
Labels
No labels