haonan-li / MultiSpanQA

MultiSpanQA: A Dataset for Multi-Span Question Answering
26 stars 10 forks source link

run the pure inference? #9

Open Konic-NLP opened 1 month ago

Konic-NLP commented 1 month ago

Hi Haonan,

I want to run the pure inference on unlabeled data but it seems that your code only support run prediction on the data with ground truth, which is not what I expect (seems have to gone through compute_metrics, but it does not fit for unannotated data), how can I apply to unannotated data? and I notice that it seems not support to run evaluation per epoch, I got KeyError: eval_loss, how can I fix it? Thank you so much!

haonan-li commented 1 month ago

Hi,

The code is written long time ago. So I am a little forgot about it. From your description I think you can solve in two ways:

  1. simply assign all tokens with a label "O" (fake label), so that you can get the prediction?
  2. You can also change the code where it computes this loss and comment the part.