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:
@@ -154,7 +154,7 @@ class SamProcessorTest(ProcessorTesterMixin, unittest.TestCase):
|
||||
self.assertEqual(masks[0].shape, (1, 3, 1764, 2646))
|
||||
|
||||
dummy_masks = [[1, 0], [0, 1]]
|
||||
with self.assertRaises(ValueError):
|
||||
with self.assertRaises(TypeError):
|
||||
masks = processor.post_process_masks(dummy_masks, np.array(original_sizes), np.array(reshaped_input_size))
|
||||
|
||||
def test_rle_encoding(self):
|
||||
|
||||
Reference in New Issue
Block a user