Skip to content

Commit

Permalink
Renamed unit test and removed unnecessary comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ca-nguyen committed Oct 27, 2021
1 parent 8dd38ec commit 260b78d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
10 changes: 2 additions & 8 deletions tests/integ/test_sagemaker_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ def test_training_step(pca_estimator_fixture, record_set_fixture, sfn_client, sf

# Cleanup
state_machine_delete_wait(sfn_client, workflow.state_machine_arn)
# End of Cleanup


def test_training_step_with_placeholders(pca_estimator_fixture, record_set_fixture, sfn_client, sfn_role_arn):
Expand Down Expand Up @@ -193,7 +192,7 @@ def test_model_step(trained_estimator, sfn_client, sagemaker_session, sfn_role_a
state_machine_delete_wait(sfn_client, workflow.state_machine_arn)
model_name = get_resource_name_from_arn(execution_output.get("ModelArn")).split("/")[1]
delete_sagemaker_model(model_name, sagemaker_session)
# End of Cleanup


def test_transform_step(trained_estimator, sfn_client, sfn_role_arn):
# Create transformer from previously created estimator
Expand Down Expand Up @@ -235,7 +234,6 @@ def test_transform_step(trained_estimator, sfn_client, sfn_role_arn):

# Cleanup
state_machine_delete_wait(sfn_client, workflow.state_machine_arn)
# End of Cleanup


def test_transform_step_with_placeholder(trained_estimator, sfn_client, sfn_role_arn):
Expand Down Expand Up @@ -360,7 +358,7 @@ def test_endpoint_config_step(trained_estimator, sfn_client, sagemaker_session,
state_machine_delete_wait(sfn_client, workflow.state_machine_arn)
delete_sagemaker_endpoint_config(endpoint_config_name, sagemaker_session)
delete_sagemaker_model(model.name, sagemaker_session)
# End of Cleanup


def test_create_endpoint_step(trained_estimator, record_set_fixture, sfn_client, sagemaker_session, sfn_role_arn):
# Setup: Create model and endpoint config for trained estimator in SageMaker
Expand Down Expand Up @@ -403,7 +401,6 @@ def test_create_endpoint_step(trained_estimator, record_set_fixture, sfn_client,
delete_sagemaker_endpoint(endpoint_name, sagemaker_session)
delete_sagemaker_endpoint_config(model.name, sagemaker_session)
delete_sagemaker_model(model.name, sagemaker_session)
# End of Cleanup


def test_tuning_step(sfn_client, record_set_for_hyperparameter_tuning, sagemaker_role_arn, sfn_role_arn):
Expand Down Expand Up @@ -455,7 +452,6 @@ def test_tuning_step(sfn_client, record_set_for_hyperparameter_tuning, sagemaker

# Cleanup
state_machine_delete_wait(sfn_client, workflow.state_machine_arn)
# End of Cleanup


def test_tuning_step_with_placeholders(sfn_client, record_set_for_hyperparameter_tuning, sagemaker_role_arn, sfn_role_arn):
Expand Down Expand Up @@ -546,7 +542,6 @@ def test_tuning_step_with_placeholders(sfn_client, record_set_for_hyperparameter

# Cleanup
state_machine_delete_wait(sfn_client, workflow.state_machine_arn)
# End of Cleanup


def test_processing_step(sklearn_processor_fixture, sagemaker_session, sfn_client, sfn_role_arn):
Expand Down Expand Up @@ -601,7 +596,6 @@ def test_processing_step(sklearn_processor_fixture, sagemaker_session, sfn_clien

# Cleanup
state_machine_delete_wait(sfn_client, workflow.state_machine_arn)
# End of Cleanup


def test_processing_step_with_placeholders(sklearn_processor_fixture, sagemaker_session, sfn_client, sfn_role_arn,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_sagemaker_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -1449,7 +1449,7 @@ def test_processing_step_creation_with_placeholders(sklearn_processor):

@patch('botocore.client.BaseClient._make_api_call', new=mock_boto_api_call)
@patch.object(boto3.session.Session, 'region_name', 'us-east-1')
def test_tuning_step_creation_with_framework(tensorflow_estimator):
def test_tuning_step_creation_with_framework_estimator(tensorflow_estimator):
hyperparameter_ranges = {
"extra_center_factor": IntegerParameter(4, 10),
"epochs": IntegerParameter(1, 2),
Expand Down

0 comments on commit 260b78d

Please sign in to comment.