Skip to content

Commit

Permalink
Merge branch 'master' into dev/vit
Browse files Browse the repository at this point in the history
  • Loading branch information
calpt committed Jun 15, 2022
2 parents 7b2a8ed + 8702c26 commit f007bd2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/transformers/adapters/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ def __init__(
"If you want to fully finetune the model use the Trainer class."
)
if (self.label_names is None or len(self.label_names) < 1) and model.active_head is not None:
self.label_names = model.heads[model.active_head].get_label_names()
all_label_names = set()
for head in model._active_heads:
all_label_names |= set(model.heads[head].get_label_names())
self.label_names = list(all_label_names)

def create_optimizer(self):
"""
Expand Down

0 comments on commit f007bd2

Please sign in to comment.