Skip to content

Commit

Permalink
Switch to bert model for testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamanehSaadat committed Apr 16, 2024
1 parent a8845ea commit 02be2bf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion keras_nlp/models/backbone_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ def test_from_preset_errors(self):
GPT2Backbone.from_preset("bert_tiny_en_uncased", load_weights=False)
with self.assertRaises(FileNotFoundError):
# No loading on a non-keras model.
Backbone.from_preset("hf://google/gemma-2b")
Backbone.from_preset("hf://google-bert/bert-base-uncased")
2 changes: 1 addition & 1 deletion keras_nlp/models/preprocessor_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ def test_from_preset_errors(self):
BertPreprocessor.from_preset("gpt2_base_en")
with self.assertRaises(FileNotFoundError):
# No loading on a non-keras model.
Preprocessor.from_preset("hf://google/gemma-2b")
Preprocessor.from_preset("hf://google-bert/bert-base-uncased")

# TODO: Add more tests when we added a model that has `preprocessor.json`.
2 changes: 1 addition & 1 deletion keras_nlp/models/task_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def test_from_preset_errors(self):
BertClassifier.from_preset("gpt2_base_en", load_weights=False)
with self.assertRaises(FileNotFoundError):
# No loading on a non-keras model.
CausalLM.from_preset("hf://google/gemma-2b")
CausalLM.from_preset("hf://google-bert/bert-base-uncased")

def test_summary_with_preprocessor(self):
preprocessor = SimplePreprocessor()
Expand Down
2 changes: 1 addition & 1 deletion keras_nlp/tokenizers/tokenizer_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def test_from_preset_errors(self):
GPT2Tokenizer.from_preset("bert_tiny_en_uncased")
with self.assertRaises(FileNotFoundError):
# No loading on a non-keras model.
Tokenizer.from_preset("hf://google/gemma-2b")
Tokenizer.from_preset("hf://google-bert/bert-base-uncased")

def test_tokenize(self):
input_data = ["the quick brown fox"]
Expand Down

0 comments on commit 02be2bf

Please sign in to comment.