Skip to content

Commit 5da8f76

Browse files
authored
Merge pull request #3 from aws/master
merge from base
2 parents da29cfa + 2d1e92e commit 5da8f76

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

tests/unit/test_sagemaker_steps.py

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
#
77
# http://www.apache.org/licenses/LICENSE-2.0
88
#
9-
# or in the "license" file accompanying this file. This file is distributed
10-
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
11-
# express or implied. See the License for the specific language governing
9+
# or in the "license" file accompanying this file. This file is distributed
10+
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
11+
# express or implied. See the License for the specific language governing
1212
# permissions and limitations under the License.
1313
from __future__ import absolute_import
1414

@@ -187,7 +187,7 @@ def tensorflow_estimator():
187187
estimator.sagemaker_session = MagicMock()
188188
estimator.sagemaker_session.boto_region_name = 'us-east-1'
189189
estimator.sagemaker_session._default_bucket = 'sagemaker'
190-
190+
191191
return estimator
192192

193193
@pytest.fixture
@@ -208,9 +208,9 @@ def sklearn_processor():
208208

209209
@patch('botocore.client.BaseClient._make_api_call', new=mock_boto_api_call)
210210
def test_training_step_creation(pca_estimator):
211-
step = TrainingStep('Training',
212-
estimator=pca_estimator,
213-
job_name='TrainingJob',
211+
step = TrainingStep('Training',
212+
estimator=pca_estimator,
213+
job_name='TrainingJob',
214214
experiment_config={
215215
'ExperimentName': 'pca_experiment',
216216
'TrialName': 'pca_trial',
@@ -247,7 +247,7 @@ def test_training_step_creation(pca_estimator):
247247
'ExperimentConfig': {
248248
'ExperimentName': 'pca_experiment',
249249
'TrialName': 'pca_trial',
250-
'TrialComponentDisplayName': 'Training'
250+
'TrialComponentDisplayName': 'Training'
251251
},
252252
'TrainingJobName': 'TrainingJob',
253253
'Tags': DEFAULT_TAGS_LIST
@@ -413,7 +413,7 @@ def test_training_step_creation_with_framework(tensorflow_estimator):
413413
mini_batch_size=1024,
414414
tags=DEFAULT_TAGS,
415415
)
416-
416+
417417
assert step.to_dict() == {
418418
'Type': 'Task',
419419
'Parameters': {
@@ -505,7 +505,7 @@ def test_transform_step_creation(pca_transformer):
505505
'ExperimentConfig': {
506506
'ExperimentName': 'pca_experiment',
507507
'TrialName': 'pca_trial',
508-
'TrialComponentDisplayName': 'Transform'
508+
'TrialComponentDisplayName': 'Transform'
509509
},
510510
'DataProcessing': {
511511
'InputFilter': '$[1:]',
@@ -592,10 +592,10 @@ def test_endpoint_config_step_creation(pca_model):
592592
enable_capture=True,
593593
sampling_percentage=100,
594594
destination_s3_uri='s3://sagemaker/datacapture')
595-
step = EndpointConfigStep('Endpoint Config',
596-
endpoint_config_name='MyEndpointConfig',
597-
model_name='pca-model',
598-
initial_instance_count=1,
595+
step = EndpointConfigStep('Endpoint Config',
596+
endpoint_config_name='MyEndpointConfig',
597+
model_name='pca-model',
598+
initial_instance_count=1,
599599
instance_type='ml.p2.xlarge',
600600
data_capture_config=data_capture_config,
601601
tags=DEFAULT_TAGS,
@@ -615,7 +615,7 @@ def test_endpoint_config_step_creation(pca_model):
615615
'InitialSamplingPercentage': 100,
616616
'DestinationS3Uri': 's3://sagemaker/datacapture',
617617
'CaptureOptions': [
618-
{'CaptureMode': 'Input'},
618+
{'CaptureMode': 'Input'},
619619
{'CaptureMode': 'Output'}
620620
],
621621
'CaptureContentTypeHeader': {
@@ -671,6 +671,7 @@ def test_processing_step_creation(sklearn_processor):
671671
'ProcessingInputs': [
672672
{
673673
'InputName': None,
674+
'AppManaged': False,
674675
'S3Input': {
675676
'LocalPath': '/opt/ml/processing/input',
676677
'S3CompressionType': 'None',
@@ -685,6 +686,7 @@ def test_processing_step_creation(sklearn_processor):
685686
'Outputs': [
686687
{
687688
'OutputName': None,
689+
'AppManaged': False,
688690
'S3Output': {
689691
'LocalPath': '/opt/ml/processing/output/train',
690692
'S3UploadMode': 'EndOfJob',
@@ -693,6 +695,7 @@ def test_processing_step_creation(sklearn_processor):
693695
},
694696
{
695697
'OutputName': None,
698+
'AppManaged': False,
696699
'S3Output': {
697700
'LocalPath': '/opt/ml/processing/output/validation',
698701
'S3UploadMode': 'EndOfJob',
@@ -701,6 +704,7 @@ def test_processing_step_creation(sklearn_processor):
701704
},
702705
{
703706
'OutputName': None,
707+
'AppManaged': False,
704708
'S3Output': {
705709
'LocalPath': '/opt/ml/processing/output/test',
706710
'S3UploadMode': 'EndOfJob',

0 commit comments

Comments
 (0)