(self)
| 241 | |
| 242 | class TestTextClassificationEvaluator(TestCase): |
| 243 | def setUp(self): |
| 244 | self.data = Dataset.from_dict({"label": [1, 0], "text": ["great movie", "horrible movie"]}) |
| 245 | self.default_model = "lvwerra/distilbert-imdb" |
| 246 | self.input_column = "text" |
| 247 | self.label_column = "label" |
| 248 | self.pipe = DummyTextClassificationPipeline() |
| 249 | self.perf_pipe = DummyTextClassificationPipeline(sleep_time=0.1) |
| 250 | self.evaluator = evaluator("text-classification") |
| 251 | self.label_mapping = {"NEGATIVE": 0.0, "POSITIVE": 1.0} |
| 252 | |
| 253 | def test_pipe_init(self): |
| 254 | results = self.evaluator.compute( |
nothing calls this directly
no test coverage detected