(self)
| 638 | |
| 639 | |
| 640 | def test_decode(self): |
| 641 | model_name = 'gpt2' |
| 642 | model_args = ModelArguments(model_name_or_path=model_name) |
| 643 | model = HFDecoderModel(model_args) |
| 644 | self.assertEqual(model.decode(test_decode_input), test_decode_output) |
| 645 | |
| 646 | batch_decode_input = [test_decode_input] * 2 |
| 647 | batch_decode_output = [test_decode_output] * 2 |
| 648 | self.assertEqual(model.decode(batch_decode_input), batch_decode_output) |
| 649 | |
| 650 | |
| 651 | def test_inference(self): |
nothing calls this directly
no test coverage detected