Skip to content

fix: skip horovod p3 test in region with no p3 #744

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 9, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions tests/integ/test_horovod.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,22 @@
import sagemaker.utils
import tests.integ as integ
from sagemaker.tensorflow import TensorFlow
from tests.integ import timeout
from tests.integ import test_region, timeout, HOSTING_NO_P3_REGIONS

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


@pytest.fixture(scope='session', params=[
'ml.c5.xlarge',
pytest.param('ml.p3.2xlarge',
marks=pytest.mark.skipif(
test_region() in HOSTING_NO_P3_REGIONS,
reason='no ml.p3 instances in this region'))])
def instance_type(request):
return request.param


@pytest.mark.canary_quick
@pytest.mark.parametrize('instance_type', ['ml.c5.xlarge', 'ml.p3.2xlarge'])
def test_horovod(sagemaker_session, instance_type, tmpdir):
job_name = sagemaker.utils.unique_name_from_base('tf-horovod')
estimator = TensorFlow(entry_point=os.path.join(horovod_dir, 'test_hvd_basic.py'),
Expand Down