5757 {'ModelName' : 'model-2' }]
5858}
5959
60+ LIST_TAGS_RESULT = {
61+ 'Tags' : [{'Key' : 'TagtestKey' , 'Value' : 'TagtestValue' }]
62+ }
63+
6064
6165@pytest .fixture ()
6266def sagemaker_session ():
@@ -69,6 +73,7 @@ def sagemaker_session():
6973 session .sagemaker_client .describe_training_job = Mock (return_value = describe )
7074 session .sagemaker_client .describe_endpoint = Mock (return_value = ENDPOINT_DESC )
7175 session .sagemaker_client .describe_endpoint_config = Mock (return_value = ENDPOINT_CONFIG_DESC )
76+ session .sagemaker_client .list_tags = Mock (return_value = LIST_TAGS_RESULT )
7277 return session
7378
7479
@@ -496,6 +501,7 @@ def test_attach(sagemaker_session, tf_version):
496501 'StoppingCondition' : {'MaxRuntimeInSeconds' : 24 * 60 * 60 },
497502 'TrainingJobName' : 'neo' ,
498503 'TrainingJobStatus' : 'Completed' ,
504+ 'TrainingJobArn' : 'arn:aws:sagemaker:us-west-2:336:training-job/neo' ,
499505 'OutputDataConfig' : {'KmsKeyId' : '' , 'S3OutputPath' : 's3://place/output/neo' },
500506 'TrainingJobOutput' : {'S3TrainingJobOutput' : 's3://here/output.tar.gz' }}
501507 sagemaker_session .sagemaker_client .describe_training_job = Mock (name = 'describe_training_job' , return_value = rjd )
@@ -544,6 +550,7 @@ def test_attach_new_repo_name(sagemaker_session, tf_version):
544550 'StoppingCondition' : {'MaxRuntimeInSeconds' : 24 * 60 * 60 },
545551 'TrainingJobName' : 'neo' ,
546552 'TrainingJobStatus' : 'Completed' ,
553+ 'TrainingJobArn' : 'arn:aws:sagemaker:us-west-2:336:training-job/neo' ,
547554 'OutputDataConfig' : {'KmsKeyId' : '' , 'S3OutputPath' : 's3://place/output/neo' },
548555 'TrainingJobOutput' : {'S3TrainingJobOutput' : 's3://here/output.tar.gz' }}
549556 sagemaker_session .sagemaker_client .describe_training_job = Mock (name = 'describe_training_job' , return_value = rjd )
@@ -593,6 +600,7 @@ def test_attach_old_container(sagemaker_session):
593600 'StoppingCondition' : {'MaxRuntimeInSeconds' : 24 * 60 * 60 },
594601 'TrainingJobName' : 'neo' ,
595602 'TrainingJobStatus' : 'Completed' ,
603+ 'TrainingJobArn' : 'arn:aws:sagemaker:us-west-2:336:training-job/neo' ,
596604 'OutputDataConfig' : {'KmsKeyId' : '' , 'S3OutputPath' : 's3://place/output/neo' },
597605 'TrainingJobOutput' : {'S3TrainingJobOutput' : 's3://here/output.tar.gz' }}
598606 sagemaker_session .sagemaker_client .describe_training_job = Mock (name = 'describe_training_job' , return_value = rjd )
@@ -642,6 +650,7 @@ def test_attach_wrong_framework(sagemaker_session):
642650 },
643651 'TrainingJobName' : 'neo' ,
644652 'TrainingJobStatus' : 'Completed' ,
653+ 'TrainingJobArn' : 'arn:aws:sagemaker:us-west-2:336:training-job/neo' ,
645654 'OutputDataConfig' : {
646655 'KmsKeyId' : '' ,
647656 'S3OutputPath' : 's3://place/output/neo'
@@ -681,6 +690,7 @@ def test_attach_custom_image(sagemaker_session):
681690 'StoppingCondition' : {'MaxRuntimeInSeconds' : 24 * 60 * 60 },
682691 'TrainingJobName' : 'neo' ,
683692 'TrainingJobStatus' : 'Completed' ,
693+ 'TrainingJobArn' : 'arn:aws:sagemaker:us-west-2:336:training-job/neo' ,
684694 'OutputDataConfig' : {'KmsKeyId' : '' , 'S3OutputPath' : 's3://place/output/neo' },
685695 'TrainingJobOutput' : {'S3TrainingJobOutput' : 's3://here/output.tar.gz' }}
686696 sagemaker_session .sagemaker_client .describe_training_job = Mock (name = 'describe_training_job' , return_value = rjd )
@@ -856,6 +866,7 @@ def test_tf_script_mode_attach(sagemaker_session, tf_version):
856866 'StoppingCondition' : {'MaxRuntimeInSeconds' : 24 * 60 * 60 },
857867 'TrainingJobName' : 'neo' ,
858868 'TrainingJobStatus' : 'Completed' ,
869+ 'TrainingJobArn' : 'arn:aws:sagemaker:us-west-2:336:training-job/neo' ,
859870 'OutputDataConfig' : {'KmsKeyId' : '' , 'S3OutputPath' : 's3://place/output/neo' },
860871 'TrainingJobOutput' : {'S3TrainingJobOutput' : 's3://here/output.tar.gz' }}
861872 sagemaker_session .sagemaker_client .describe_training_job = Mock (name = 'describe_training_job' , return_value = rjd )
0 commit comments