@@ -457,7 +457,8 @@ def test_register_model_with_model_repack_with_estimator(
457
457
assert len (request_dict ["DependsOn" ]) == 1
458
458
assert request_dict ["DependsOn" ][0 ] == "TestStep"
459
459
arguments = request_dict ["Arguments" ]
460
- repacker_job_name = arguments ["HyperParameters" ]["sagemaker_job_name" ]
460
+ assert BUCKET in arguments ["HyperParameters" ]["sagemaker_submit_directory" ]
461
+ arguments ["HyperParameters" ].pop ("sagemaker_submit_directory" )
461
462
assert ordered (arguments ) == ordered (
462
463
{
463
464
"AlgorithmSpecification" : {
@@ -472,12 +473,8 @@ def test_register_model_with_model_repack_with_estimator(
472
473
"inference_script" : '"dummy_script.py"' ,
473
474
"dependencies" : f'"{ dummy_requirements } "' ,
474
475
"model_archive" : '"model.tar.gz"' ,
475
- "sagemaker_submit_directory" : '"s3://{}/{}/source/sourcedir.tar.gz"' .format (
476
- BUCKET , repacker_job_name .replace ('"' , "" )
477
- ),
478
476
"sagemaker_program" : '"_repack_model.py"' ,
479
477
"sagemaker_container_log_level" : "20" ,
480
- "sagemaker_job_name" : repacker_job_name ,
481
478
"sagemaker_region" : f'"{ REGION } "' ,
482
479
"source_dir" : "null" ,
483
480
},
@@ -585,7 +582,8 @@ def test_register_model_with_model_repack_with_model(model, model_metrics, drift
585
582
assert len (request_dict ["DependsOn" ]) == 1
586
583
assert request_dict ["DependsOn" ][0 ] == "TestStep"
587
584
arguments = request_dict ["Arguments" ]
588
- repacker_job_name = arguments ["HyperParameters" ]["sagemaker_job_name" ]
585
+ assert BUCKET in arguments ["HyperParameters" ]["sagemaker_submit_directory" ]
586
+ arguments ["HyperParameters" ].pop ("sagemaker_submit_directory" )
589
587
assert ordered (arguments ) == ordered (
590
588
{
591
589
"AlgorithmSpecification" : {
@@ -599,12 +597,8 @@ def test_register_model_with_model_repack_with_model(model, model_metrics, drift
599
597
"HyperParameters" : {
600
598
"inference_script" : '"dummy_script.py"' ,
601
599
"model_archive" : '"model.tar.gz"' ,
602
- "sagemaker_submit_directory" : '"s3://{}/{}/source/sourcedir.tar.gz"' .format (
603
- BUCKET , repacker_job_name .replace ('"' , "" )
604
- ),
605
600
"sagemaker_program" : '"_repack_model.py"' ,
606
601
"sagemaker_container_log_level" : "20" ,
607
- "sagemaker_job_name" : repacker_job_name ,
608
602
"sagemaker_region" : f'"{ REGION } "' ,
609
603
"dependencies" : "null" ,
610
604
"source_dir" : "null" ,
@@ -717,7 +711,8 @@ def test_register_model_with_model_repack_with_pipeline_model(
717
711
assert len (request_dict ["DependsOn" ]) == 1
718
712
assert request_dict ["DependsOn" ][0 ] == "TestStep"
719
713
arguments = request_dict ["Arguments" ]
720
- repacker_job_name = arguments ["HyperParameters" ]["sagemaker_job_name" ]
714
+ assert BUCKET in arguments ["HyperParameters" ]["sagemaker_submit_directory" ]
715
+ arguments ["HyperParameters" ].pop ("sagemaker_submit_directory" )
721
716
assert ordered (arguments ) == ordered (
722
717
{
723
718
"AlgorithmSpecification" : {
@@ -732,12 +727,8 @@ def test_register_model_with_model_repack_with_pipeline_model(
732
727
"dependencies" : "null" ,
733
728
"inference_script" : '"dummy_script.py"' ,
734
729
"model_archive" : '"model.tar.gz"' ,
735
- "sagemaker_submit_directory" : '"s3://{}/{}/source/sourcedir.tar.gz"' .format (
736
- BUCKET , repacker_job_name .replace ('"' , "" )
737
- ),
738
730
"sagemaker_program" : '"_repack_model.py"' ,
739
731
"sagemaker_container_log_level" : "20" ,
740
- "sagemaker_job_name" : repacker_job_name ,
741
732
"sagemaker_region" : f'"{ REGION } "' ,
742
733
"source_dir" : "null" ,
743
734
},
@@ -917,7 +908,6 @@ def test_estimator_transformer_with_model_repack_with_estimator(estimator):
917
908
arguments = request_dict ["Arguments" ]
918
909
# pop out the dynamic generated fields
919
910
arguments ["HyperParameters" ].pop ("sagemaker_submit_directory" )
920
- arguments ["HyperParameters" ].pop ("sagemaker_job_name" )
921
911
assert arguments == {
922
912
"AlgorithmSpecification" : {
923
913
"TrainingInputMode" : "File" ,
0 commit comments