Skip to content

Update all MXNet integ tests to use the latest version #589

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 4 commits into from
Jan 9, 2019
Merged
Show file tree
Hide file tree
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
73 changes: 0 additions & 73 deletions tests/data/mxnet_mnist/mnist_framework_mode.py

This file was deleted.

5 changes: 3 additions & 2 deletions tests/integ/test_local_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,13 @@ def test_mxnet_local_mode(sagemaker_local_session, mxnet_full_version):
mx.delete_endpoint()


def test_mxnet_local_data_local_script():
def test_mxnet_local_data_local_script(mxnet_full_version):
data_path = os.path.join(DATA_DIR, 'mxnet_mnist')
script_path = os.path.join(data_path, 'mnist_framework_mode.py')
script_path = os.path.join(data_path, 'mnist.py')

mx = MXNet(entry_point=script_path, role='SageMakerRole',
train_instance_count=1, train_instance_type='local',
framework_version=mxnet_full_version,
sagemaker_session=LocalNoS3Session())

train_input = 'file://' + os.path.join(data_path, 'train')
Expand Down
8 changes: 4 additions & 4 deletions tests/integ/test_tuner.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,20 +404,20 @@ def test_stop_tuning_job(sagemaker_session):


@pytest.mark.continuous_testing
def test_tuning_mxnet(sagemaker_session):
def test_tuning_mxnet(sagemaker_session, mxnet_full_version):
with timeout(minutes=TUNING_DEFAULT_TIMEOUT_MINUTES):
script_path = os.path.join(DATA_DIR, 'mxnet_mnist', 'mnist_framework_mode.py')
script_path = os.path.join(DATA_DIR, 'mxnet_mnist', 'mnist.py')
data_path = os.path.join(DATA_DIR, 'mxnet_mnist')

estimator = MXNet(entry_point=script_path,
role='SageMakerRole',
py_version=PYTHON_VERSION,
train_instance_count=1,
train_instance_type='ml.m4.xlarge',
framework_version='1.2.1',
framework_version=mxnet_full_version,
sagemaker_session=sagemaker_session)

hyperparameter_ranges = {'learning_rate': ContinuousParameter(0.01, 0.2)}
hyperparameter_ranges = {'learning-rate': ContinuousParameter(0.01, 0.2)}
Copy link
Contributor

@ChoiByungWook ChoiByungWook Jan 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are underscores not allowed anymore?

Ignore my question, mnist.py has the hp learning-rate as learning_rate compared to the last mnist_framework_mode.py.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

underscores are allowed, but I think it looks nicer with hyphens when they're CLI arguments :)

objective_metric_name = 'Validation-accuracy'
metric_definitions = [
{'Name': 'Validation-accuracy', 'Regex': 'Validation-accuracy=([0-9\\.]+)'}]
Expand Down