Skip to content

A programming framework for agentic AI

updating the data collator for seq-regression to handle the dim mismatch problem (#751)

Xueqing Liuc01e65bb48d8
diff --git a/flaml/nlp/huggingface/data_collator.py b/flaml/nlp/huggingface/data_collator.py
index 2d10f1520..b3911c291 100644
--- a/flaml/nlp/huggingface/data_collator.py
+++ b/flaml/nlp/huggingface/data_collator.py
@@ -11,6 +11,7 @@ from flaml.data import (
MULTICHOICECLASSIFICATION,
SUMMARIZATION,
SEQCLASSIFICATION,
+ SEQREGRESSION
)
@@ -51,5 +52,6 @@ task_to_datacollator_class = OrderedDict(
(MULTICHOICECLASSIFICATION, DataCollatorForMultipleChoiceClassification),
(SUMMARIZATION, DataCollatorForSeq2Seq),
(SEQCLASSIFICATION, DataCollatorWithPadding),
+ (SEQREGRESSION, DataCollatorWithPadding),
]
)