Skip to content

Commit

Permalink
test(applications): change use_pretrained to False
Browse files Browse the repository at this point in the history
  • Loading branch information
englishbook committed Sep 12, 2019
1 parent 38a17cf commit 23bfc8c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tests/fancy_nlp/applications/test_spm.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def setup_class(self):
self.preprocessor_file = os.path.join(self.checkpoint_dir, 'siamese_cnn_preprocessor.pkl')

def test_spm(self):
spm = SPM()
spm = SPM(use_pretrained=False)

# test train word and char
spm.fit(train_data=self.train_data,
Expand Down Expand Up @@ -109,8 +109,6 @@ def test_spm(self):
# test predict
valid_label = spm.predict([self.valid_data[0][0], self.valid_data[1][0]])
assert isinstance(valid_label, str)
print([self.valid_data[0][0], self.valid_data[1][0]])
print(valid_label)

# test predict_batch
valid_labels = spm.predict_batch(self.valid_data)
Expand All @@ -122,8 +120,6 @@ def test_spm(self):
valid_label = spm.analyze([self.valid_data[0][0], self.valid_data[1][0]])
assert isinstance(valid_label, tuple)
assert len(valid_label) == spm.preprocessor.num_class
print(valid_label)
print(self.valid_labels[0])

# test analyze_batch
valid_labels = spm.analyze_batch(self.valid_data)
Expand Down

0 comments on commit 23bfc8c

Please sign in to comment.