@@ -295,7 +295,6 @@ def create_monitoring_schedule(
295
295
network_config_dict = None
296
296
if self .network_config is not None :
297
297
network_config_dict = self .network_config ._to_request_dict ()
298
- self ._validate_network_config (network_config_dict )
299
298
300
299
self .sagemaker_session .create_monitoring_schedule (
301
300
monitoring_schedule_name = self .monitoring_schedule_name ,
@@ -448,7 +447,6 @@ def update_monitoring_schedule(
448
447
network_config_dict = None
449
448
if self .network_config is not None :
450
449
network_config_dict = self .network_config ._to_request_dict ()
451
- self ._validate_network_config (network_config_dict )
452
450
453
451
self .sagemaker_session .update_monitoring_schedule (
454
452
monitoring_schedule_name = self .monitoring_schedule_name ,
@@ -708,6 +706,9 @@ def attach(cls, monitor_schedule_name, sagemaker_session=None):
708
706
if network_config_dict :
709
707
network_config = NetworkConfig (
710
708
enable_network_isolation = network_config_dict ["EnableNetworkIsolation" ],
709
+ encrypt_inter_container_traffic = network_config_dict [
710
+ "EnableInterContainerTrafficEncryption"
711
+ ],
711
712
security_group_ids = security_group_ids ,
712
713
subnets = subnets ,
713
714
)
@@ -784,6 +785,9 @@ def _attach(clazz, sagemaker_session, schedule_desc, job_desc, tags):
784
785
if network_config_dict :
785
786
network_config = NetworkConfig (
786
787
enable_network_isolation = network_config_dict ["EnableNetworkIsolation" ],
788
+ encrypt_inter_container_traffic = network_config_dict [
789
+ "EnableInterContainerTrafficEncryption"
790
+ ],
787
791
security_group_ids = security_group_ids ,
788
792
subnets = subnets ,
789
793
)
@@ -1164,31 +1168,6 @@ def _wait_for_schedule_changes_to_apply(self):
1164
1168
if schedule_desc ["MonitoringScheduleStatus" ] != "Pending" :
1165
1169
break
1166
1170
1167
- def _validate_network_config (self , network_config_dict ):
1168
- """Function to validate EnableInterContainerTrafficEncryption.
1169
-
1170
- It validates EnableInterContainerTrafficEncryption is not set in the provided
1171
- NetworkConfig request dictionary.
1172
-
1173
- Args:
1174
- network_config_dict (dict): NetworkConfig request dictionary.
1175
- Contains parameters from :class:`~sagemaker.network.NetworkConfig` object
1176
- that configures network isolation, encryption of
1177
- inter-container traffic, security group IDs, and subnets.
1178
-
1179
- """
1180
- if "EnableInterContainerTrafficEncryption" in network_config_dict :
1181
- message = (
1182
- "EnableInterContainerTrafficEncryption is not supported in Model Monitor. "
1183
- "Please ensure that encrypt_inter_container_traffic=None "
1184
- "when creating your NetworkConfig object. "
1185
- "Current encrypt_inter_container_traffic value: {}" .format (
1186
- self .network_config .encrypt_inter_container_traffic
1187
- )
1188
- )
1189
- _LOGGER .info (message )
1190
- raise ValueError (message )
1191
-
1192
1171
@classmethod
1193
1172
def monitoring_type (cls ):
1194
1173
"""Type of the monitoring job."""
@@ -1781,7 +1760,6 @@ def update_monitoring_schedule(
1781
1760
network_config_dict = None
1782
1761
if self .network_config is not None :
1783
1762
network_config_dict = self .network_config ._to_request_dict ()
1784
- super (DefaultModelMonitor , self )._validate_network_config (network_config_dict )
1785
1763
1786
1764
if role is not None :
1787
1765
self .role = role
@@ -2034,6 +2012,9 @@ def attach(cls, monitor_schedule_name, sagemaker_session=None):
2034
2012
subnets = vpc_config .get ("Subnets" )
2035
2013
network_config = NetworkConfig (
2036
2014
enable_network_isolation = network_config_dict ["EnableNetworkIsolation" ],
2015
+ encrypt_inter_container_traffic = network_config_dict [
2016
+ "EnableInterContainerTrafficEncryption"
2017
+ ],
2037
2018
security_group_ids = security_group_ids ,
2038
2019
subnets = subnets ,
2039
2020
)
@@ -2304,7 +2285,6 @@ def _build_create_data_quality_job_definition_request(
2304
2285
2305
2286
if network_config is not None :
2306
2287
network_config_dict = network_config ._to_request_dict ()
2307
- self ._validate_network_config (network_config_dict )
2308
2288
request_dict ["NetworkConfig" ] = network_config_dict
2309
2289
elif existing_network_config is not None :
2310
2290
request_dict ["NetworkConfig" ] = existing_network_config
@@ -3007,7 +2987,6 @@ def _build_create_model_quality_job_definition_request(
3007
2987
3008
2988
if network_config is not None :
3009
2989
network_config_dict = network_config ._to_request_dict ()
3010
- self ._validate_network_config (network_config_dict )
3011
2990
request_dict ["NetworkConfig" ] = network_config_dict
3012
2991
elif existing_network_config is not None :
3013
2992
request_dict ["NetworkConfig" ] = existing_network_config
0 commit comments