| 7 | from utils.kagglehub import create_test_kagglehub_server |
| 8 | |
| 9 | class TestKerasNLP(unittest.TestCase): |
| 10 | def test_fit(self): |
| 11 | with create_test_kagglehub_server(): |
| 12 | classifier = keras_nlp.models.BertClassifier.from_preset( |
| 13 | 'bert_tiny_en_uncased', |
| 14 | load_weights=False, # load randomly initialized model from preset architecture with weights |
| 15 | num_classes=2, |
| 16 | activation="softmax", |
| 17 | ) |
| 18 | result = classifier.predict(['What an amazing movie!']) |
| 19 | self.assertEqual((1, 2), result.shape) |
nothing calls this directly
no outgoing calls
no test coverage detected