Skip to content

Commit

Permalink
Skip MPS on test_integraion as well
Browse files Browse the repository at this point in the history
  • Loading branch information
sadra-barikbin committed Sep 29, 2024
1 parent 479d1b7 commit 954d130
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/ignite/metrics/vision/test_object_detection_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -923,13 +923,16 @@ def test_compute(sample):
def test_integration(sample):
bs = 3

device = idist.device()
if device == torch.device("mps"):
pytest.skip("Due to MPS backend out of memory")

def update(engine, i):
b = slice(i * bs, (i + 1) * bs)
return sample.data[0][b], sample.data[1][b]

engine = Engine(update)

device = idist.device()
metric_device = "cpu" if device.type == "xla" else device
metric_50_95 = ObjectDetectionAvgPrecisionRecall(num_classes=91, device=metric_device)
metric_50_95.attach(engine, name="mAP[50-95]")
Expand Down

0 comments on commit 954d130

Please # to comment.