Skip to content

Commit 5ad444a

Browse files
authored
fix: skip horovod p3 test in region with no p3 (#744)
1 parent 7146911 commit 5ad444a

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

tests/integ/test_horovod.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,22 @@
2323
import sagemaker.utils
2424
import tests.integ as integ
2525
from sagemaker.tensorflow import TensorFlow
26-
from tests.integ import timeout
26+
from tests.integ import test_region, timeout, HOSTING_NO_P3_REGIONS
2727

2828
horovod_dir = os.path.join(os.path.dirname(__file__), '..', 'data', 'horovod')
2929

3030

31+
@pytest.fixture(scope='session', params=[
32+
'ml.c5.xlarge',
33+
pytest.param('ml.p3.2xlarge',
34+
marks=pytest.mark.skipif(
35+
test_region() in HOSTING_NO_P3_REGIONS,
36+
reason='no ml.p3 instances in this region'))])
37+
def instance_type(request):
38+
return request.param
39+
40+
3141
@pytest.mark.canary_quick
32-
@pytest.mark.parametrize('instance_type', ['ml.c5.xlarge', 'ml.p3.2xlarge'])
3342
def test_horovod(sagemaker_session, instance_type, tmpdir):
3443
job_name = sagemaker.utils.unique_name_from_base('tf-horovod')
3544
estimator = TensorFlow(entry_point=os.path.join(horovod_dir, 'test_hvd_basic.py'),

0 commit comments

Comments
 (0)