From 1d01a78c2b0f5889b29fe774102cf3c8d651629b Mon Sep 17 00:00:00 2001 From: "wenmeng.zwm" Date: Wed, 1 Jun 2022 09:16:39 +0800 Subject: [PATCH] fix: UT error Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/8899458 * fix: UT error --- configs/nlp/sequence_classification_trainer.yaml | 2 +- tests/pipelines/test_text_classification.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configs/nlp/sequence_classification_trainer.yaml b/configs/nlp/sequence_classification_trainer.yaml index 17e9028d..62f6f75f 100644 --- a/configs/nlp/sequence_classification_trainer.yaml +++ b/configs/nlp/sequence_classification_trainer.yaml @@ -51,7 +51,7 @@ train: num_steps: 100000 evaluation: # [being used] - model_path: .cache/easynlp/bert-base-sst2 + model_path: .cache/easynlp/ max_sequence_length: 128 batch_size: 32 metrics: diff --git a/tests/pipelines/test_text_classification.py b/tests/pipelines/test_text_classification.py index 39390a88..03a5b83f 100644 --- a/tests/pipelines/test_text_classification.py +++ b/tests/pipelines/test_text_classification.py @@ -42,7 +42,7 @@ class SequenceClassificationTest(unittest.TestCase): with zipfile.ZipFile(cache_path_str, 'r') as zipf: zipf.extractall(cache_path.parent) - path = r'.cache/easynlp/bert-base-sst2' + path = r'.cache/easynlp/' model = SequenceClassificationModel(path) preprocessor = SequenceClassificationPreprocessor( path, first_sequence='sentence', second_sequence=None) @@ -74,7 +74,7 @@ class SequenceClassificationTest(unittest.TestCase): with zipfile.ZipFile(cache_path_str, 'r') as zipf: zipf.extractall(cache_path.parent) - path = r'.cache/easynlp/bert-base-sst2' + path = r'.cache/easynlp/' model = SequenceClassificationModel(path) preprocessor = SequenceClassificationPreprocessor( path, first_sequence='sentence', second_sequence=None)