Skip to content

Commit a17a29c

Browse files
committed
resolve tests
1 parent c388431 commit a17a29c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/trainer/test_trainer.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1586,12 +1586,15 @@ def test_pytorch_profiler_nested(tmpdir):
15861586

15871587
for n in ('a', 'b', 'c'):
15881588
pa[n] = [e.name for e in pa[n]]
1589-
if LooseVersion(torch.__version__) >= LooseVersion("1.7.1"):
1589+
if LooseVersion(torch.__version__) >= LooseVersion("1.7.0"):
15901590
pa[n] = [e.replace("aten::", "") for e in pa[n]]
15911591
assert pa[n] == expected_[n]
15921592

15931593

1594-
@RunIf(min_gpus=1, special=True)
1594+
@pytest.mark.skipif(torch.cuda.device_count() < 1, reason="test requires GPU machine")
1595+
@pytest.mark.skipif(
1596+
not os.getenv("PL_RUNNING_SPECIAL_TESTS", '0') == '1', reason="test should be run outside of pytest"
1597+
)
15951598
def test_pytorch_profiler_nested_emit_nvtx(tmpdir):
15961599
"""
15971600
This test check emit_nvtx is correctly supported

0 commit comments

Comments
 (0)