Skip to content

Commit 531dfb8

Browse files
author
SeanNaren
committed
Format
1 parent 1beb7af commit 531dfb8

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

tests/accelerators/test_ddp.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,13 @@ def test_move_to_device_in_pre_dispatch(mock_model_to_device, tmpdir, move_to_de
113113
in training.
114114
"""
115115

116-
with mock.patch(f'pytorch_lightning.plugins.DDPPlugin.call_move_to_device_hook_in_pre_dispatch',
117-
move_to_device_pre_dispatch_enabled):
116+
with mock.patch(
117+
f'pytorch_lightning.plugins.DDPPlugin.call_move_to_device_hook_in_pre_dispatch',
118+
move_to_device_pre_dispatch_enabled
119+
):
118120
model = BoringModel()
119121
trainer = Trainer(
120-
default_root_dir=tmpdir,
121-
fast_dev_run=True,
122-
accelerator='ddp',
123-
plugins=DDPPlugin(),
124-
num_processes=1
122+
default_root_dir=tmpdir, fast_dev_run=True, accelerator='ddp', plugins=DDPPlugin(), num_processes=1
125123
)
126124
trainer.fit(model)
127125

0 commit comments

Comments
 (0)