Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move accelerator legacy tests #5948

Merged
merged 15 commits into from
Feb 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion benchmarks/test_sharded_parity.py
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
14 changes: 0 additions & 14 deletions tests/accelerators/legacy/__init__.py

This file was deleted.

Original file line number Diff line number Diff line change
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.
2 changes: 1 addition & 1 deletion tests/trainer/properties/test_get_model.py
Original file line number Diff line number Diff line change
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