Skip to content

Commit 4f491a2

Browse files
carmoccajustusschock
authored andcommitted
Restore test after #11448 (#11986)
1 parent 6e3168d commit 4f491a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/trainer/flags/test_env_vars.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ def test_passing_env_variables_defaults():
4545
assert trainer.max_steps == 42
4646

4747

48-
@mock.patch.dict(os.environ, {"CUDA_VISIBLE_DEVICES": "0,1", "PL_TRAINER_GPUS": "2"})
48+
@mock.patch.dict(os.environ, {"CUDA_VISIBLE_DEVICES": "0,1", "PL_TRAINER_DEVICES": "2"})
4949
@mock.patch("torch.cuda.device_count", return_value=2)
5050
@mock.patch("torch.cuda.is_available", return_value=True)
5151
def test_passing_env_variables_devices(cuda_available_mock, device_count_mock):
5252
"""Testing overwriting trainer arguments."""
5353
trainer = Trainer()
5454
assert trainer.devices == 2
5555
trainer = Trainer(accelerator="gpu", devices=1)
56-
assert trainer.devices == 2
56+
assert trainer.devices == 1

0 commit comments

Comments
 (0)