6
6
#
7
7
# http://www.apache.org/licenses/LICENSE-2.0
8
8
#
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
12
12
# permissions and limitations under the License.
13
13
from __future__ import absolute_import
14
14
@@ -187,7 +187,7 @@ def tensorflow_estimator():
187
187
estimator .sagemaker_session = MagicMock ()
188
188
estimator .sagemaker_session .boto_region_name = 'us-east-1'
189
189
estimator .sagemaker_session ._default_bucket = 'sagemaker'
190
-
190
+
191
191
return estimator
192
192
193
193
@pytest .fixture
@@ -208,9 +208,9 @@ def sklearn_processor():
208
208
209
209
@patch ('botocore.client.BaseClient._make_api_call' , new = mock_boto_api_call )
210
210
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' ,
214
214
experiment_config = {
215
215
'ExperimentName' : 'pca_experiment' ,
216
216
'TrialName' : 'pca_trial' ,
@@ -247,7 +247,7 @@ def test_training_step_creation(pca_estimator):
247
247
'ExperimentConfig' : {
248
248
'ExperimentName' : 'pca_experiment' ,
249
249
'TrialName' : 'pca_trial' ,
250
- 'TrialComponentDisplayName' : 'Training'
250
+ 'TrialComponentDisplayName' : 'Training'
251
251
},
252
252
'TrainingJobName' : 'TrainingJob' ,
253
253
'Tags' : DEFAULT_TAGS_LIST
@@ -413,7 +413,7 @@ def test_training_step_creation_with_framework(tensorflow_estimator):
413
413
mini_batch_size = 1024 ,
414
414
tags = DEFAULT_TAGS ,
415
415
)
416
-
416
+
417
417
assert step .to_dict () == {
418
418
'Type' : 'Task' ,
419
419
'Parameters' : {
@@ -505,7 +505,7 @@ def test_transform_step_creation(pca_transformer):
505
505
'ExperimentConfig' : {
506
506
'ExperimentName' : 'pca_experiment' ,
507
507
'TrialName' : 'pca_trial' ,
508
- 'TrialComponentDisplayName' : 'Transform'
508
+ 'TrialComponentDisplayName' : 'Transform'
509
509
},
510
510
'DataProcessing' : {
511
511
'InputFilter' : '$[1:]' ,
@@ -592,10 +592,10 @@ def test_endpoint_config_step_creation(pca_model):
592
592
enable_capture = True ,
593
593
sampling_percentage = 100 ,
594
594
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 ,
599
599
instance_type = 'ml.p2.xlarge' ,
600
600
data_capture_config = data_capture_config ,
601
601
tags = DEFAULT_TAGS ,
@@ -615,7 +615,7 @@ def test_endpoint_config_step_creation(pca_model):
615
615
'InitialSamplingPercentage' : 100 ,
616
616
'DestinationS3Uri' : 's3://sagemaker/datacapture' ,
617
617
'CaptureOptions' : [
618
- {'CaptureMode' : 'Input' },
618
+ {'CaptureMode' : 'Input' },
619
619
{'CaptureMode' : 'Output' }
620
620
],
621
621
'CaptureContentTypeHeader' : {
@@ -671,6 +671,7 @@ def test_processing_step_creation(sklearn_processor):
671
671
'ProcessingInputs' : [
672
672
{
673
673
'InputName' : None ,
674
+ 'AppManaged' : False ,
674
675
'S3Input' : {
675
676
'LocalPath' : '/opt/ml/processing/input' ,
676
677
'S3CompressionType' : 'None' ,
@@ -685,6 +686,7 @@ def test_processing_step_creation(sklearn_processor):
685
686
'Outputs' : [
686
687
{
687
688
'OutputName' : None ,
689
+ 'AppManaged' : False ,
688
690
'S3Output' : {
689
691
'LocalPath' : '/opt/ml/processing/output/train' ,
690
692
'S3UploadMode' : 'EndOfJob' ,
@@ -693,6 +695,7 @@ def test_processing_step_creation(sklearn_processor):
693
695
},
694
696
{
695
697
'OutputName' : None ,
698
+ 'AppManaged' : False ,
696
699
'S3Output' : {
697
700
'LocalPath' : '/opt/ml/processing/output/validation' ,
698
701
'S3UploadMode' : 'EndOfJob' ,
@@ -701,6 +704,7 @@ def test_processing_step_creation(sklearn_processor):
701
704
},
702
705
{
703
706
'OutputName' : None ,
707
+ 'AppManaged' : False ,
704
708
'S3Output' : {
705
709
'LocalPath' : '/opt/ml/processing/output/test' ,
706
710
'S3UploadMode' : 'EndOfJob' ,
0 commit comments