fix the post-processing bug in NER (#534)

* fix conll bug

* update DataCollatorForAuto

* adding label_list comments
This commit is contained in:
Xueqing Liu
2022-05-10 17:22:57 -04:00
committed by GitHub
parent c1bb66980c
commit 2a8decdc50
8 changed files with 92 additions and 64 deletions

View File

@@ -347,3 +347,4 @@ class TestClassification(unittest.TestCase):
if __name__ == "__main__":
unittest.main()
test = TestClassification()

View File

@@ -13,7 +13,18 @@ def test_tokenclassification():
automl_settings = get_automl_settings()
automl_settings["task"] = "token-classification"
automl_settings["metric"] = "seqeval"
automl_settings["metric"] = "seqeval:overall_f1" # evaluating based on the overall_f1 of seqeval
automl_settings["fit_kwargs_by_estimator"]["transformer"]["label_list"] = [
"O",
"B-PER",
"I-PER",
"B-ORG",
"I-ORG",
"B-LOC",
"I-LOC",
"B-MISC",
"I-MISC",
]
try:
automl.fit(