A programming framework for agentic AI
Issue724 (#745)
Xueqing Liuceb3e300cd79
diff --git a/flaml/nlp/huggingface/data_collator.py b/flaml/nlp/huggingface/data_collator.pyindex 7f33dc330..2d10f1520 100644--- a/flaml/nlp/huggingface/data_collator.py+++ b/flaml/nlp/huggingface/data_collator.py@@ -6,7 +6,12 @@ from transformers.data.data_collator import ()from collections import OrderedDict-from flaml.data import TOKENCLASSIFICATION, MULTICHOICECLASSIFICATION, SUMMARIZATION+from flaml.data import (+ TOKENCLASSIFICATION,+ MULTICHOICECLASSIFICATION,+ SUMMARIZATION,+ SEQCLASSIFICATION,+)@dataclass@@ -45,5 +50,6 @@ task_to_datacollator_class = OrderedDict((TOKENCLASSIFICATION, DataCollatorForTokenClassification),(MULTICHOICECLASSIFICATION, DataCollatorForMultipleChoiceClassification),(SUMMARIZATION, DataCollatorForSeq2Seq),+ (SEQCLASSIFICATION, DataCollatorWithPadding),])diff --git a/test/nlp/test_autohf.py b/test/nlp/test_autohf.pyindex ee0ab693f..f21f02543 100644--- a/test/nlp/test_autohf.py+++ b/test/nlp/test_autohf.py@@ -56,7 +56,7 @@ def test_hf_data():record_id=0,**automl_settings)- automl.predict(X_test)+ automl.predict(X_test, **{"per_device_eval_batch_size": 2})automl.predict(["test test", "test test"])automl.predict([