Raise TypeError instead of ValueError for invalid types (#38660)
* Raise TypeError instead of ValueError for invalid types. * Removed un-necessary changes. * Resolved conflicts * Code quality * Fix failing tests. * Fix failing tests.
This commit is contained in:
@@ -81,7 +81,7 @@ class Text2TextGenerationPipelineTests(unittest.TestCase):
|
||||
],
|
||||
)
|
||||
|
||||
with self.assertRaises(ValueError):
|
||||
with self.assertRaises(TypeError):
|
||||
generator(4)
|
||||
|
||||
@require_torch
|
||||
|
||||
Reference in New Issue
Block a user