Skip to content

Commit

Permalink
skip test for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushikb11 committed Mar 19, 2021
1 parent e2fafe5 commit e033f51
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/plugins/test_custom_plugin.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
import pytest
import torch

from pytorch_lightning import Trainer
from pytorch_lightning.plugins import DDPPlugin
from tests.helpers import BoringModel
from tests.helpers.runif import RunIf


class CustomParallelPlugin(DDPPlugin):

def __init__(self, **kwargs):
super().__init__(**kwargs)
# Set to None so it will be overwritten by the accelerator connector.
self.sync_batchnorm = None


@RunIf(skip_windows=True)
@pytest.mark.skipif(torch.cuda.is_available(), reason="test doesn't requires GPU machine")
def test_sync_batchnorm_set(tmpdir):
"""Tests if sync_batchnorm is automatically set for custom plugin."""
Expand Down

0 comments on commit e033f51

Please sign in to comment.