Skip to content

Commit

Permalink
move accelerator legacy tests (#5948)
Browse files Browse the repository at this point in the history

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
awaelchli and mergify[bot] committed Feb 14, 2021
1 parent 0345fcf commit a3d4e7c
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 18 deletions.
2 changes: 1 addition & 1 deletion benchmarks/test_sharded_parity.py
Expand Up @@ -23,7 +23,7 @@
from pytorch_lightning import seed_everything, Trainer
from pytorch_lightning.plugins import DDPSpawnShardedPlugin
from pytorch_lightning.utilities import _FAIRSCALE_AVAILABLE, _NATIVE_AMP_AVAILABLE
from tests.accelerators.legacy import DDPLauncher
from tests.accelerators import DDPLauncher
from tests.helpers.boring_model import BoringModel, RandomDataset


Expand Down
2 changes: 1 addition & 1 deletion dockers/tpu-tests/tpu_test_cases.jsonnet
Expand Up @@ -23,7 +23,7 @@ local tputests = base.BaseTest {
cd pytorch-lightning
coverage run --source=pytorch_lightning -m pytest -v --capture=no \
pytorch_lightning/utilities/xla_device_utils.py \
tests/accelerators/legacy/test_tpu_backend.py \
tests/accelerators/test_tpu_backend.py \
tests/models/test_tpu.py
test_exit_code=$?
echo "\n||| END PYTEST LOGS |||\n"
Expand Down
12 changes: 12 additions & 0 deletions tests/accelerators/__init__.py
@@ -0,0 +1,12 @@
try:
from dtrun.launcher import DDPLauncher
except ImportError:

class DDPLauncher:

def run(cmd_line, **kwargs):

def inner(func):
pass

return inner
File renamed without changes.
14 changes: 0 additions & 14 deletions tests/accelerators/legacy/__init__.py

This file was deleted.

Expand Up @@ -16,7 +16,7 @@
import pytest
import torch

from tests.accelerators.legacy import ddp_model, DDPLauncher
from tests.accelerators import ddp_model, DDPLauncher
from tests.utilities.distributed import call_training_script


Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/trainer/properties/test_get_model.py
Expand Up @@ -17,7 +17,7 @@
import torch

from pytorch_lightning import Trainer
from tests.accelerators.legacy import DDPLauncher
from tests.accelerators import DDPLauncher
from tests.helpers.boring_model import BoringModel


Expand Down

0 comments on commit a3d4e7c

Please sign in to comment.