Skip to content

Commit 03fe3b5

Browse files
author
lezwon
committed
flake fix
1 parent a3269e9 commit 03fe3b5

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

tests/trainer/test_trainer.py

-22
Original file line numberDiff line numberDiff line change
@@ -804,28 +804,6 @@ def test_tpu_choice(tmpdir, tpu_cores, expected_tpu_id, error_expected):
804804
assert trainer.tpu_id == expected_tpu_id
805805

806806

807-
@pytest.mark.parametrize(['tpu_cores', 'expected_tpu_id', 'error_expected'], [
808-
pytest.param(1, None, False),
809-
pytest.param(8, None, False),
810-
pytest.param([1], 1, False),
811-
pytest.param([8], 8, False),
812-
pytest.param('1,', 1, False),
813-
pytest.param('1', None, False),
814-
pytest.param('9, ', 9, True),
815-
pytest.param([9], 9, True),
816-
pytest.param([0], 0, True),
817-
pytest.param(2, None, True),
818-
pytest.param(10, None, True),
819-
])
820-
def test_tpu_choice(tmpdir, tpu_cores, expected_tpu_id, error_expected):
821-
if error_expected:
822-
with pytest.raises(MisconfigurationException, match=r'.*tpu_cores` can only be 1, 8 or [<1-8>]*'):
823-
Trainer(default_root_dir=tmpdir, tpu_cores=tpu_cores, auto_select_gpus=True)
824-
else:
825-
trainer = Trainer(default_root_dir=tmpdir, tpu_cores=tpu_cores, auto_select_gpus=True)
826-
assert trainer.tpu_id == expected_tpu_id
827-
828-
829807
@pytest.mark.parametrize("trainer_kwargs,expected", [
830808
pytest.param(
831809
dict(distributed_backend=None, gpus=None),

0 commit comments

Comments
 (0)