Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 20, 2021
1 parent 0dedcc0 commit fbd5a83
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/plugins/test_ddp_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def test_ddp_barrier_non_consecutive_device_ids(barrier_mock, tmpdir):

@RunIf(min_gpus=1)
def test_ddp_plugin_teardown():
"""test DDPPlugin has been called and teardown training_type_plugin correctly """
"""test DDPPlugin has been called and teardown training_type_plugin correctly"""
model = BoringModel()
ddp_plugin = DDPPlugin()
trainer = Trainer(
Expand Down
6 changes: 3 additions & 3 deletions tests/plugins/test_ddp_spawn_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import torch

from torch.nn.parallel.distributed import DistributedDataParallel

from pytorch_lightning import Trainer, LightningModule
from pytorch_lightning import LightningModule, Trainer
from pytorch_lightning.plugins import DDPSpawnPlugin
from tests.helpers.boring_model import BoringDataModule, BoringModel
from tests.helpers.runif import RunIf
Expand Down Expand Up @@ -80,9 +79,10 @@ def test_ddp_spawn_extra_parameters(tmpdir):
assert trainer.callback_metrics[val_name] == torch.tensor(val)
assert model.test_val == "test_val"


@RunIf(min_gpus=1)
def test_ddp_spawn_plugin_teardown():
"""test DDPPlugin has been called and teardown training_type_plugin correctly """
"""test DDPPlugin has been called and teardown training_type_plugin correctly"""
model = BoringModel()
ddp_plugin = DDPSpawnPlugin()
trainer = Trainer(
Expand Down

0 comments on commit fbd5a83

Please sign in to comment.