Skip to content

Commit

Permalink
3.8 skips
Browse files Browse the repository at this point in the history
  • Loading branch information
carmocca committed Mar 30, 2023
1 parent ee33a21 commit 33354e8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/tests_fabric/accelerators/test_tpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

@RunIf(tpu=True)
def test_auto_device_count():
assert TPUAccelerator.auto_device_count() == os.environ["TPU_NUM_DEVICES"]
assert TPUAccelerator.auto_device_count() == int(os.environ["TPU_NUM_DEVICES"])


@RunIf(tpu=True)
Expand Down
1 change: 1 addition & 0 deletions tests/tests_fabric/test_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,7 @@ def get_defaults(cls):


@pytest.mark.parametrize("is_interactive", (False, True))
@RunIf(min_python="3.9") # mocking issue
def test_connector_auto_selection(monkeypatch, is_interactive):
no_cuda = mock.patch("lightning.fabric.accelerators.cuda.num_cuda_devices", return_value=0)
single_cuda = mock.patch("lightning.fabric.accelerators.cuda.num_cuda_devices", return_value=1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,7 @@ def test_gpu_accelerator_backend_choice_cuda(cuda_count_1):
assert isinstance(trainer.accelerator, CUDAAccelerator)


@RunIf(min_python="3.9") # mocking issue
def test_gpu_accelerator_backend_choice_mps(mps_count_1, cuda_count_0):
trainer = Trainer(accelerator="gpu")
assert trainer._accelerator_connector._accelerator_flag == "mps"
Expand Down Expand Up @@ -811,6 +812,7 @@ def __instancecheck__(self, instance):


@pytest.mark.parametrize("is_interactive", (False, True))
@RunIf(min_python="3.9") # mocking issue
def test_connector_auto_selection(monkeypatch, is_interactive):
import lightning.fabric # avoid breakage with standalone package

Expand Down

0 comments on commit 33354e8

Please sign in to comment.