few-shot-NER-benchmark/BaselineCode

Runing bash train_lc.sh.Got this error without modifing the code.

Godxia opened this issue · 2 comments

Traceback (most recent call last):
File "train_lc.py", line 539, in
t_prob = get_prob([unsup_data_], id2labels)
File "train_lc.py", line 219, in get_prob
loss, output, logits = model(text_1, attention_mask=attention_mask_1, labels=cls_1, dataset = dataset_chosen[j])
ValueError: not enough values to unpack (expected 3, got 2)

Hi,
Please make sure that your code is up-to-date with our repo. I checked train_lc.py and line 219 is "val_loss += loss.mean().item()", while line 218 is
"loss, output, logits = model(text_1, attention_mask=attention_mask_1, labels=cls_1, dataset = dataset_chosen[j], output_logits=True)",
which is also different from your provided line 219.