@@ -107,7 +107,6 @@ def test_sklearn(sagemaker_session, sklearn_full_version, cpu_instance_type):
107
107
instance_count = 1 ,
108
108
command = ["python3" ],
109
109
sagemaker_session = sagemaker_session ,
110
- max_runtime_in_seconds = 3600 , # TODO-reinvent-2019: REMOVE
111
110
base_job_name = "test-sklearn" ,
112
111
)
113
112
@@ -121,10 +120,12 @@ def test_sklearn(sagemaker_session, sklearn_full_version, cpu_instance_type):
121
120
job_description = sklearn_processor .latest_job .describe ()
122
121
123
122
assert len (job_description ["ProcessingInputs" ]) == 2
124
- assert job_description ["ProcessingResources" ] == {
125
- "ClusterConfig" : {"InstanceCount" : 1 , "InstanceType" : "ml.m4.xlarge" , "VolumeSizeInGB" : 30 }
126
- }
127
- assert job_description ["StoppingCondition" ] == {"MaxRuntimeInSeconds" : 3600 }
123
+ assert job_description ["ProcessingResources" ]["ClusterConfig" ]["InstanceCount" ] == 1
124
+ assert (
125
+ job_description ["ProcessingResources" ]["ClusterConfig" ]["InstanceType" ] == cpu_instance_type
126
+ )
127
+ assert job_description ["ProcessingResources" ]["ClusterConfig" ]["VolumeSizeInGB" ] == 30
128
+ assert job_description ["StoppingCondition" ] == {"MaxRuntimeInSeconds" : 86400 }
128
129
assert job_description ["AppSpecification" ]["ContainerEntrypoint" ] == [
129
130
"python3" ,
130
131
"/opt/ml/processing/input/code/dummy_script.py" ,
@@ -191,9 +192,11 @@ def test_sklearn_with_customizations(
191
192
assert job_description ["ProcessingOutputConfig" ]["KmsKeyId" ] == output_kms_key
192
193
assert job_description ["ProcessingOutputConfig" ]["Outputs" ][0 ]["OutputName" ] == "dummy_output"
193
194
194
- assert job_description ["ProcessingResources" ] == {
195
- "ClusterConfig" : {"InstanceCount" : 1 , "InstanceType" : "ml.m4.xlarge" , "VolumeSizeInGB" : 100 }
196
- }
195
+ assert job_description ["ProcessingResources" ]["ClusterConfig" ]["InstanceCount" ] == 1
196
+ assert (
197
+ job_description ["ProcessingResources" ]["ClusterConfig" ]["InstanceType" ] == cpu_instance_type
198
+ )
199
+ assert job_description ["ProcessingResources" ]["ClusterConfig" ]["VolumeSizeInGB" ] == 100
197
200
198
201
assert job_description ["AppSpecification" ]["ContainerArguments" ] == ["-v" ]
199
202
assert job_description ["AppSpecification" ]["ContainerEntrypoint" ] == [
@@ -274,9 +277,11 @@ def test_sklearn_with_custom_default_bucket(
274
277
assert job_description ["ProcessingOutputConfig" ]["KmsKeyId" ] == output_kms_key
275
278
assert job_description ["ProcessingOutputConfig" ]["Outputs" ][0 ]["OutputName" ] == "dummy_output"
276
279
277
- assert job_description ["ProcessingResources" ] == {
278
- "ClusterConfig" : {"InstanceCount" : 1 , "InstanceType" : "ml.m4.xlarge" , "VolumeSizeInGB" : 100 }
279
- }
280
+ assert job_description ["ProcessingResources" ]["ClusterConfig" ]["InstanceCount" ] == 1
281
+ assert (
282
+ job_description ["ProcessingResources" ]["ClusterConfig" ]["InstanceType" ] == cpu_instance_type
283
+ )
284
+ assert job_description ["ProcessingResources" ]["ClusterConfig" ]["VolumeSizeInGB" ] == 100
280
285
281
286
assert job_description ["AppSpecification" ]["ContainerArguments" ] == ["-v" ]
282
287
assert job_description ["AppSpecification" ]["ContainerEntrypoint" ] == [
@@ -322,9 +327,11 @@ def test_sklearn_with_no_inputs_or_outputs(
322
327
323
328
assert job_description ["ProcessingJobStatus" ] == "Completed"
324
329
325
- assert job_description ["ProcessingResources" ] == {
326
- "ClusterConfig" : {"InstanceCount" : 1 , "InstanceType" : "ml.m4.xlarge" , "VolumeSizeInGB" : 100 }
327
- }
330
+ assert job_description ["ProcessingResources" ]["ClusterConfig" ]["InstanceCount" ] == 1
331
+ assert (
332
+ job_description ["ProcessingResources" ]["ClusterConfig" ]["InstanceType" ] == cpu_instance_type
333
+ )
334
+ assert job_description ["ProcessingResources" ]["ClusterConfig" ]["VolumeSizeInGB" ] == 100
328
335
329
336
assert job_description ["AppSpecification" ]["ContainerArguments" ] == ["-v" ]
330
337
assert job_description ["AppSpecification" ]["ContainerEntrypoint" ] == [
@@ -397,9 +404,11 @@ def test_script_processor(sagemaker_session, image_uri, cpu_instance_type, outpu
397
404
assert job_description ["ProcessingOutputConfig" ]["KmsKeyId" ] == output_kms_key
398
405
assert job_description ["ProcessingOutputConfig" ]["Outputs" ][0 ]["OutputName" ] == "dummy_output"
399
406
400
- assert job_description ["ProcessingResources" ] == {
401
- "ClusterConfig" : {"InstanceCount" : 1 , "InstanceType" : "ml.m4.xlarge" , "VolumeSizeInGB" : 100 }
402
- }
407
+ assert job_description ["ProcessingResources" ]["ClusterConfig" ]["InstanceCount" ] == 1
408
+ assert (
409
+ job_description ["ProcessingResources" ]["ClusterConfig" ]["InstanceType" ] == cpu_instance_type
410
+ )
411
+ assert job_description ["ProcessingResources" ]["ClusterConfig" ]["VolumeSizeInGB" ] == 100
403
412
404
413
assert job_description ["AppSpecification" ]["ContainerArguments" ] == ["-v" ]
405
414
assert job_description ["AppSpecification" ]["ContainerEntrypoint" ] == [
@@ -445,9 +454,11 @@ def test_script_processor_with_no_inputs_or_outputs(
445
454
446
455
assert job_description ["ProcessingJobStatus" ] == "Completed"
447
456
448
- assert job_description ["ProcessingResources" ] == {
449
- "ClusterConfig" : {"InstanceCount" : 1 , "InstanceType" : "ml.m4.xlarge" , "VolumeSizeInGB" : 100 }
450
- }
457
+ assert job_description ["ProcessingResources" ]["ClusterConfig" ]["InstanceCount" ] == 1
458
+ assert (
459
+ job_description ["ProcessingResources" ]["ClusterConfig" ]["InstanceType" ] == cpu_instance_type
460
+ )
461
+ assert job_description ["ProcessingResources" ]["ClusterConfig" ]["VolumeSizeInGB" ] == 100
451
462
452
463
assert job_description ["AppSpecification" ]["ContainerArguments" ] == ["-v" ]
453
464
assert job_description ["AppSpecification" ]["ContainerEntrypoint" ] == [
@@ -511,9 +522,11 @@ def test_processor(sagemaker_session, image_uri, cpu_instance_type, output_kms_k
511
522
assert job_description ["ProcessingOutputConfig" ]["KmsKeyId" ] == output_kms_key
512
523
assert job_description ["ProcessingOutputConfig" ]["Outputs" ][0 ]["OutputName" ] == "dummy_output"
513
524
514
- assert job_description ["ProcessingResources" ] == {
515
- "ClusterConfig" : {"InstanceCount" : 1 , "InstanceType" : "ml.m4.xlarge" , "VolumeSizeInGB" : 100 }
516
- }
525
+ assert job_description ["ProcessingResources" ]["ClusterConfig" ]["InstanceCount" ] == 1
526
+ assert (
527
+ job_description ["ProcessingResources" ]["ClusterConfig" ]["InstanceType" ] == cpu_instance_type
528
+ )
529
+ assert job_description ["ProcessingResources" ]["ClusterConfig" ]["VolumeSizeInGB" ] == 100
517
530
518
531
assert job_description ["AppSpecification" ]["ContainerArguments" ] == ["-v" ]
519
532
assert job_description ["AppSpecification" ]["ContainerEntrypoint" ] == [
@@ -580,9 +593,11 @@ def test_processor_with_custom_bucket(
580
593
assert job_description ["ProcessingOutputConfig" ]["KmsKeyId" ] == output_kms_key
581
594
assert job_description ["ProcessingOutputConfig" ]["Outputs" ][0 ]["OutputName" ] == "dummy_output"
582
595
583
- assert job_description ["ProcessingResources" ] == {
584
- "ClusterConfig" : {"InstanceCount" : 1 , "InstanceType" : "ml.m4.xlarge" , "VolumeSizeInGB" : 100 }
585
- }
596
+ assert job_description ["ProcessingResources" ]["ClusterConfig" ]["InstanceCount" ] == 1
597
+ assert (
598
+ job_description ["ProcessingResources" ]["ClusterConfig" ]["InstanceType" ] == cpu_instance_type
599
+ )
600
+ assert job_description ["ProcessingResources" ]["ClusterConfig" ]["VolumeSizeInGB" ] == 100
586
601
587
602
assert job_description ["AppSpecification" ]["ContainerArguments" ] == ["-v" ]
588
603
assert job_description ["AppSpecification" ]["ContainerEntrypoint" ] == [
0 commit comments