MCPcopy Create free account
hub / github.com/PAIR-code/lit / setUpClass

Method setUpClass

lit_nlp/components/thresholder_int_test.py:49–62  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

47
48 @classmethod
49 def setUpClass(cls):
50 super().setUpClass()
51 cls.model = caching.CachingModelWrapper(
52 glue_models.SST2Model(BERT_TINY_PATH), 'test'
53 )
54 cls.dataset = lit_dataset.IndexedDataset(
55 id_fn=caching.input_hash,
56 spec={
57 'sentence': lit_types.TextSegment(),
58 'label': lit_types.CategoryLabel(vocab=['0', '1'])
59 },
60 examples=_EXAMPLES,
61 )
62 cls.model_outputs = list(cls.model.predict(_EXAMPLES))
63
64 def setUp(self):
65 super().setUp()

Callers

nothing calls this directly

Calls 1

predictMethod · 0.45

Tested by

no test coverage detected