Adding ValueError when imcompatible parameters are used. (#20729)

This commit is contained in:
Nicolas Patry
2022-12-12 15:39:13 +01:00
committed by GitHub
parent 5ba2dbd9b1
commit 53357e8196
2 changed files with 5 additions and 0 deletions

View File

@@ -201,6 +201,9 @@ class TextGenerationPipelineTests(unittest.TestCase, metaclass=PipelineTestCaseM
],
)
with self.assertRaises(ValueError):
outputs = text_generator("test", return_full_text=True, return_text=True)
# Empty prompt is slighly special
# it requires BOS token to exist.
# Special case for Pegasus which will always append EOS so will