@@ -804,28 +804,6 @@ def test_tpu_choice(tmpdir, tpu_cores, expected_tpu_id, error_expected):
804
804
assert trainer .tpu_id == expected_tpu_id
805
805
806
806
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
-
829
807
@pytest .mark .parametrize ("trainer_kwargs,expected" , [
830
808
pytest .param (
831
809
dict (distributed_backend = None , gpus = None ),
0 commit comments