Skip to content

Commit acba9d7

Browse files
casteryhfacebook-github-bot
authored andcommitted
BUCK for tests (#76)
Summary: automation Reviewed By: felipemello1 Differential Revision: D86159099
1 parent 1a88f54 commit acba9d7

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/test_resharding_ext.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,29 @@
77
from logging import getLogger
88

99
import pytest
10+
<<<<<<< dest: 48073f95a923 - yuxuanh: [torchstore] fix multiple tests. with...
11+
||||||| base: cfdab62d4cf0 - yuxuanh: [torchstore] fix multiple tests. with...
12+
13+
=======
14+
import os
15+
16+
>>>>>>> source: de5869157b5c - yuxuanh: [torchstore] BUCK for tests
1017
from torch.distributed._tensor import Shard
1118

1219
from .test_resharding_basic import _test_resharding
1320
from .utils import main, transport_plus_strategy_params
1421

1522
logger = getLogger(__name__)
1623

24+
import pytest
25+
26+
def slow_tests_enabled():
27+
return os.environ.get("TORCHSTORE_ENABLE_SLOW_TESTS", "0") == "1"
28+
29+
requires_slow_tests_enabled = pytest.mark.skipif(
30+
not slow_tests_enabled(),
31+
reason="Slow tests are disabled by default, use TORCHSTORE_ENABLE_SLOW_TESTS=1 to enable them",
32+
)
1733

1834
@pytest.mark.parametrize(*transport_plus_strategy_params())
1935
@pytest.mark.parametrize(
@@ -53,6 +69,7 @@ async def test_1d_resharding(
5369
)
5470

5571

72+
@requires_slow_tests_enabled
5673
@pytest.mark.parametrize(*transport_plus_strategy_params())
5774
@pytest.mark.asyncio
5875
async def test_2d_to_2d_resharding(strategy_params, use_rdma):

0 commit comments

Comments
 (0)