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
Language I am using the model on (English, Chinese ...): Chinese
Adapter setup I am using (if any): pfeiffer
The problem arises when using:
the official example scripts: (give details below)
my own modified scripts: (give details below)
I am using the official run_glue.py script on stsb task, and the error occurs:
Traceback (most recent call last):
File "/root/adapter-transformers/examples/pytorch/text-classification/run_glue.py", line 642, in<module>main()
File "/root/adapter-transformers/examples/pytorch/text-classification/run_glue.py", line 360, in main
id2label={i: v fori, vin enumerate(label_list)} if num_labels > 0 else None,
UnboundLocalError: local variable 'label_list' referenced before assignment
I think it may be because that the add_classification_head requires id2label for all glue tasks but there is not one for stsb task. So I change the num_labels > 0 to num_labels > 1 on the run_glue.py line 360 and it works for me.
The tasks I am working on is:
an official GLUE/SQUaD task: (give the name)
my own task or dataset: (give details below)
To reproduce
Steps to reproduce the behavior:
Expected behavior
The text was updated successfully, but these errors were encountered:
Environment info
adapter-transformers
version:Information
Model I am using (Bert, XLNet ...): BERT
Language I am using the model on (English, Chinese ...): Chinese
Adapter setup I am using (if any): pfeiffer
The problem arises when using:
I am using the official
run_glue.py
script on stsb task, and the error occurs:I think it may be because that the
add_classification_head
requires id2label for all glue tasks but there is not one for stsb task. So I change thenum_labels > 0
tonum_labels > 1
on therun_glue.py line 360
and it works for me.The tasks I am working on is:
To reproduce
Steps to reproduce the behavior:
Expected behavior
The text was updated successfully, but these errors were encountered: