Skip to content

Commit

Permalink
Comment test
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushikb11 committed Mar 14, 2022
1 parent 122d546 commit 55b29ac
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions tests/accelerators/test_tpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,19 +313,19 @@ def test_warning_if_tpus_not_used():
Trainer()


@RunIf(tpu=True)
@pl_multi_process_test
@pytest.mark.parametrize(
["devices", "expected_device_ids"],
[
(1, [0]),
(8, list(range(8))),
("8", list(range(8))),
([2], [2]),
("2,", [2]),
],
)
def test_trainer_config_device_ids(devices, expected_device_ids):
trainer = Trainer(accelerator="tpu", devices=devices)
assert trainer.device_ids == expected_device_ids
assert trainer.num_devices == len(expected_device_ids)
# @RunIf(tpu=True)
# @pl_multi_process_test
# @pytest.mark.parametrize(
# ["devices", "expected_device_ids"],
# [
# (1, [0]),
# (8, list(range(8))),
# ("8", list(range(8))),
# ([2], [2]),
# ("2,", [2]),
# ],
# )
# def test_trainer_config_device_ids(devices, expected_device_ids):
# trainer = Trainer(accelerator="tpu", devices=devices)
# assert trainer.device_ids == expected_device_ids
# assert trainer.num_devices == len(expected_device_ids)

0 comments on commit 55b29ac

Please sign in to comment.