wenmeng.zwm yingda.chen 3 years ago
parent
commit
1d01a78c2b
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      configs/nlp/sequence_classification_trainer.yaml
  2. +2
    -2
      tests/pipelines/test_text_classification.py

+ 1
- 1
configs/nlp/sequence_classification_trainer.yaml View File

@@ -51,7 +51,7 @@ train:
num_steps: 100000 num_steps: 100000


evaluation: # [being used] evaluation: # [being used]
model_path: .cache/easynlp/bert-base-sst2
model_path: .cache/easynlp/
max_sequence_length: 128 max_sequence_length: 128
batch_size: 32 batch_size: 32
metrics: metrics:


+ 2
- 2
tests/pipelines/test_text_classification.py View File

@@ -42,7 +42,7 @@ class SequenceClassificationTest(unittest.TestCase):


with zipfile.ZipFile(cache_path_str, 'r') as zipf: with zipfile.ZipFile(cache_path_str, 'r') as zipf:
zipf.extractall(cache_path.parent) zipf.extractall(cache_path.parent)
path = r'.cache/easynlp/bert-base-sst2'
path = r'.cache/easynlp/'
model = SequenceClassificationModel(path) model = SequenceClassificationModel(path)
preprocessor = SequenceClassificationPreprocessor( preprocessor = SequenceClassificationPreprocessor(
path, first_sequence='sentence', second_sequence=None) path, first_sequence='sentence', second_sequence=None)
@@ -74,7 +74,7 @@ class SequenceClassificationTest(unittest.TestCase):


with zipfile.ZipFile(cache_path_str, 'r') as zipf: with zipfile.ZipFile(cache_path_str, 'r') as zipf:
zipf.extractall(cache_path.parent) zipf.extractall(cache_path.parent)
path = r'.cache/easynlp/bert-base-sst2'
path = r'.cache/easynlp/'
model = SequenceClassificationModel(path) model = SequenceClassificationModel(path)
preprocessor = SequenceClassificationPreprocessor( preprocessor = SequenceClassificationPreprocessor(
path, first_sequence='sentence', second_sequence=None) path, first_sequence='sentence', second_sequence=None)


Loading…
Cancel
Save