Skip to content

Commit 2ce6ee1

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 0d0e3db commit 2ce6ee1

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

tests/tests_fabric/plugins/precision/test_amp_integration.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ def forward(self, x):
4242

4343
@pytest.mark.skipif(
4444
# https://github.com/pytorch/pytorch/issues/116056
45-
sys.platform == "win32" and _TORCH_GREATER_EQUAL_2_2, reason="Windows + DDP issue in PyTorch 2.2"
45+
sys.platform == "win32" and _TORCH_GREATER_EQUAL_2_2,
46+
reason="Windows + DDP issue in PyTorch 2.2",
4647
)
4748
@pytest.mark.parametrize(
4849
("accelerator", "precision", "expected_dtype"),

tests/tests_fabric/strategies/launchers/test_multiprocessing_integration.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ def __init__(self):
3333

3434
@pytest.mark.skipif(
3535
# https://github.com/pytorch/pytorch/issues/116056
36-
sys.platform == "win32" and _TORCH_GREATER_EQUAL_2_2, reason="Windows + DDP issue in PyTorch 2.2"
36+
sys.platform == "win32" and _TORCH_GREATER_EQUAL_2_2,
37+
reason="Windows + DDP issue in PyTorch 2.2",
3738
)
3839
@pytest.mark.parametrize("strategy", ["ddp_spawn", pytest.param("ddp_fork", marks=RunIf(skip_windows=True))])
3940
def test_memory_sharing_disabled(strategy):

tests/tests_fabric/strategies/test_ddp_integration.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@
2020
import pytest
2121
import torch
2222
from lightning.fabric import Fabric
23-
from lightning.fabric.utilities.imports import _TORCH_GREATER_EQUAL_2_0
23+
from lightning.fabric.utilities.imports import _TORCH_GREATER_EQUAL_2_0, _TORCH_GREATER_EQUAL_2_2
2424
from torch.nn.parallel.distributed import DistributedDataParallel
2525

2626
from tests_fabric.helpers.runif import RunIf
2727
from tests_fabric.strategies.test_single_device import _run_test_clip_gradients
28-
from lightning.fabric.utilities.imports import _TORCH_GREATER_EQUAL_2_2
2928
from tests_fabric.test_fabric import BoringModel
3029

3130

3231
@pytest.mark.skipif(
3332
# https://github.com/pytorch/pytorch/issues/116056
34-
sys.platform == "win32" and _TORCH_GREATER_EQUAL_2_2, reason="Windows + DDP issue in PyTorch 2.2"
33+
sys.platform == "win32" and _TORCH_GREATER_EQUAL_2_2,
34+
reason="Windows + DDP issue in PyTorch 2.2",
3535
)
3636
@pytest.mark.parametrize(
3737
"accelerator",

tests/tests_fabric/utilities/test_distributed.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ def test_collective_operations(devices, process):
122122

123123
@pytest.mark.skipif(
124124
# https://github.com/pytorch/pytorch/issues/116056
125-
sys.platform == "win32" and _TORCH_GREATER_EQUAL_2_2,reason="Windows + DDP issue in PyTorch 2.2"
125+
sys.platform == "win32" and _TORCH_GREATER_EQUAL_2_2,
126+
reason="Windows + DDP issue in PyTorch 2.2",
126127
)
127128
@pytest.mark.flaky(reruns=3) # flaky with "process 0 terminated with signal SIGABRT" (GLOO)
128129
def test_is_shared_filesystem(tmp_path, monkeypatch):

tests/tests_fabric/utilities/test_spike.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ def spike_detection_test(fabric, global_rank_spike, spike_value, should_raise):
3131

3232
@pytest.mark.skipif(
3333
# https://github.com/pytorch/pytorch/issues/116056
34-
sys.platform == "win32" and _TORCH_GREATER_EQUAL_2_2,reason="Windows + DDP issue in PyTorch 2.2"
34+
sys.platform == "win32" and _TORCH_GREATER_EQUAL_2_2,
35+
reason="Windows + DDP issue in PyTorch 2.2",
3536
)
3637
@pytest.mark.flaky(max_runs=3)
3738
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)