-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Unit test Tester.test_draw_boxes failing on Windows/Linux/MacOS test builds #3637
Copy link
Copy link
Closed
Closed
Copy link
Description
🐛 Bug
Unit test Tester.test_draw_boxes is failing on all test CircleCI builds.
Lines 110 to 127 in 37eb37a
| def test_draw_boxes(self): | |
| img = torch.full((3, 100, 100), 255, dtype=torch.uint8) | |
| img_cp = img.clone() | |
| boxes_cp = boxes.clone() | |
| labels = ["a", "b", "c", "d"] | |
| colors = ["green", "#FF00FF", (0, 255, 0), "red"] | |
| result = utils.draw_bounding_boxes(img, boxes, labels=labels, colors=colors, fill=True) | |
| path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "assets", "fakedata", "draw_boxes_util.png") | |
| if not os.path.exists(path): | |
| res = Image.fromarray(result.permute(1, 2, 0).contiguous().numpy()) | |
| res.save(path) | |
| expected = torch.as_tensor(np.array(Image.open(path))).permute(2, 0, 1) | |
| self.assertTrue(torch.equal(result, expected)) | |
| # Check if modification is not in place | |
| self.assertTrue(torch.all(torch.eq(boxes, boxes_cp)).item()) | |
| self.assertTrue(torch.all(torch.eq(img, img_cp)).item()) |
To Reproduce
Steps to reproduce the behavior:
- Make a PR that is not changing source code
- View unit test CircleCI build results.
Sample builds that is not modifying existing source code:
Reactions are currently unavailable