From 1c76f268e0212d8c9f91623b73af3ba7addbb22c Mon Sep 17 00:00:00 2001 From: Nirbhai Date: Thu, 7 May 2026 16:36:03 +0530 Subject: [PATCH] Skip TestGatherLayer_Losses on macOS TestGatherLayer_Losses uses DDPStrategy(devices=2) under pytest. On macOS, the spawn start method causes the DDP worker child to re-import the test module and block on pytest fixture machinery, while the parent waits for the child to join the DDP process group. The result is make test-fast hanging indefinitely with no output. The same class is already skipped on GitHub Actions for codecov reasons. Adding macOS to the existing condition removes the local hang without changing CI coverage --- tests/utils/test_dist__gather__losses.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/utils/test_dist__gather__losses.py b/tests/utils/test_dist__gather__losses.py index 941b070a5..ee437cf91 100644 --- a/tests/utils/test_dist__gather__losses.py +++ b/tests/utils/test_dist__gather__losses.py @@ -1,4 +1,5 @@ import os +import sys from typing import Any, Generator, Tuple, Type import pytest @@ -63,8 +64,11 @@ def close_torch_distributed() -> Generator[None, None, None]: @pytest.mark.skipif( - os.getenv("GITHUB_ACTIONS") is not None, - reason="This test is running in parallel and breaks codecov", + os.getenv("GITHUB_ACTIONS") is not None or sys.platform == "darwin", + reason=( + "Skipped on GitHub Actions due to codecov interaction and " + "on macOS due to DDPStrategy spawn deadlock." + ), ) class TestGatherLayer_Losses: """