@@ -407,6 +407,9 @@ def test_framework_initialization_with_sagemaker_config_injection(sagemaker_sess
407407 "TrainingJob"
408408 ]["EnableInterContainerTrafficEncryption" ]
409409 expected_environment = SAGEMAKER_CONFIG_TRAINING_JOB ["SageMaker" ]["TrainingJob" ]["Environment" ]
410+ expected_disable_profiler_attribute = SAGEMAKER_CONFIG_TRAINING_JOB ["SageMaker" ]["TrainingJob" ][
411+ "ProfilerConfig"
412+ ]["DisableProfiler" ]
410413 assert framework .role == expected_role_arn
411414 assert framework .enable_network_isolation () == expected_enable_network_isolation
412415 assert (
@@ -418,6 +421,7 @@ def test_framework_initialization_with_sagemaker_config_injection(sagemaker_sess
418421 assert framework .security_group_ids == expected_security_groups
419422 assert framework .subnets == expected_subnets
420423 assert framework .environment == expected_environment
424+ assert framework .disable_profiler == expected_disable_profiler_attribute
421425
422426
423427def test_estimator_initialization_with_sagemaker_config_injection (sagemaker_session ):
@@ -453,6 +457,9 @@ def test_estimator_initialization_with_sagemaker_config_injection(sagemaker_sess
453457 "TrainingJob"
454458 ]["EnableInterContainerTrafficEncryption" ]
455459 expected_environment = SAGEMAKER_CONFIG_TRAINING_JOB ["SageMaker" ]["TrainingJob" ]["Environment" ]
460+ expected_disable_profiler_attribute = SAGEMAKER_CONFIG_TRAINING_JOB ["SageMaker" ]["TrainingJob" ][
461+ "ProfilerConfig"
462+ ]["DisableProfiler" ]
456463 assert estimator .role == expected_role_arn
457464 assert estimator .enable_network_isolation () == expected_enable_network_isolation
458465 assert (
@@ -464,6 +471,7 @@ def test_estimator_initialization_with_sagemaker_config_injection(sagemaker_sess
464471 assert estimator .security_group_ids == expected_security_groups
465472 assert estimator .subnets == expected_subnets
466473 assert estimator .environment == expected_environment
474+ assert estimator .disable_profiler == expected_disable_profiler_attribute
467475
468476
469477def test_estimator_initialization_with_sagemaker_config_injection_no_kms_supported (
@@ -498,6 +506,9 @@ def test_estimator_initialization_with_sagemaker_config_injection_no_kms_support
498506 expected_enable_inter_container_traffic_encryption = SAGEMAKER_CONFIG_TRAINING_JOB ["SageMaker" ][
499507 "TrainingJob"
500508 ]["EnableInterContainerTrafficEncryption" ]
509+ expected_disable_profiler_attribute = SAGEMAKER_CONFIG_TRAINING_JOB ["SageMaker" ]["TrainingJob" ][
510+ "ProfilerConfig"
511+ ]["DisableProfiler" ]
501512 assert estimator .role == expected_role_arn
502513 assert estimator .enable_network_isolation () == expected_enable_network_isolation
503514 assert (
@@ -508,6 +519,7 @@ def test_estimator_initialization_with_sagemaker_config_injection_no_kms_support
508519 assert estimator .volume_kms_key is None
509520 assert estimator .security_group_ids == expected_security_groups
510521 assert estimator .subnets == expected_subnets
522+ assert estimator .disable_profiler == expected_disable_profiler_attribute
511523
512524
513525def test_estimator_initialization_with_sagemaker_config_injection_partial_kms_support (
@@ -545,6 +557,9 @@ def test_estimator_initialization_with_sagemaker_config_injection_partial_kms_su
545557 expected_enable_inter_container_traffic_encryption = SAGEMAKER_CONFIG_TRAINING_JOB ["SageMaker" ][
546558 "TrainingJob"
547559 ]["EnableInterContainerTrafficEncryption" ]
560+ expected_disable_profiler_attribute = SAGEMAKER_CONFIG_TRAINING_JOB ["SageMaker" ]["TrainingJob" ][
561+ "ProfilerConfig"
562+ ]["DisableProfiler" ]
548563 assert estimator .role == expected_role_arn
549564 assert estimator .enable_network_isolation () == expected_enable_network_isolation
550565 assert (
@@ -555,6 +570,7 @@ def test_estimator_initialization_with_sagemaker_config_injection_partial_kms_su
555570 assert estimator .volume_kms_key == expected_volume_kms_key_id
556571 assert estimator .security_group_ids == expected_security_groups
557572 assert estimator .subnets == expected_subnets
573+ assert estimator .disable_profiler == expected_disable_profiler_attribute
558574
559575
560576def test_framework_with_heterogeneous_cluster (sagemaker_session ):
0 commit comments