7979 },
8080 "RoleArn" : "arn:aws:iam::366:role/SageMakerRole" ,
8181 "ResourceConfig" : {"VolumeSizeInGB" : 30 , "InstanceCount" : 1 , "InstanceType" : "ml.c4.xlarge" },
82+ "EnableNetworkIsolation" : False ,
8283 "StoppingCondition" : {"MaxRuntimeInSeconds" : 24 * 60 * 60 },
8384 "TrainingJobName" : "neo" ,
8485 "TrainingJobStatus" : "Completed" ,
@@ -671,6 +672,7 @@ def test_enable_cloudwatch_metrics(sagemaker_session):
671672def test_attach_framework (sagemaker_session ):
672673 returned_job_description = RETURNED_JOB_DESCRIPTION .copy ()
673674 returned_job_description ["VpcConfig" ] = {"Subnets" : ["foo" ], "SecurityGroupIds" : ["bar" ]}
675+ returned_job_description ["EnableNetworkIsolation" ] = True
674676 sagemaker_session .sagemaker_client .describe_training_job = Mock (
675677 name = "describe_training_job" , return_value = returned_job_description
676678 )
@@ -694,6 +696,7 @@ def test_attach_framework(sagemaker_session):
694696 assert framework_estimator .security_group_ids == ["bar" ]
695697 assert framework_estimator .encrypt_inter_container_traffic is False
696698 assert framework_estimator .tags == LIST_TAGS_RESULT ["Tags" ]
699+ assert framework_estimator .enable_network_isolation () is True
697700
698701
699702def test_attach_without_hyperparameters (sagemaker_session ):
0 commit comments