@@ -2625,6 +2625,7 @@ def create_model_from_job(
26252625 image_uri = None ,
26262626 model_data_url = None ,
26272627 env = None ,
2628+ enable_network_isolation = False ,
26282629 vpc_config_override = vpc_utils .VPC_CONFIG_DEFAULT ,
26292630 tags = None ,
26302631 ):
@@ -2642,6 +2643,7 @@ def create_model_from_job(
26422643 model_data_url (str): S3 location of the model data (default: None). If None, defaults
26432644 to the ``ModelS3Artifacts`` of ``training_job_name``.
26442645 env (dict[string,string]): Model environment variables (default: {}).
2646+ enable_network_isolation (bool): Whether the model requires network isolation or not.
26452647 vpc_config_override (dict[str, list[str]]): Optional override for VpcConfig set on the
26462648 model.
26472649 Default: use VpcConfig from training job.
@@ -2665,7 +2667,14 @@ def create_model_from_job(
26652667 env = env ,
26662668 )
26672669 vpc_config = _vpc_config_from_training_job (training_job , vpc_config_override )
2668- return self .create_model (name , role , primary_container , vpc_config = vpc_config , tags = tags )
2670+ return self .create_model (
2671+ name ,
2672+ role ,
2673+ primary_container ,
2674+ enable_network_isolation = enable_network_isolation ,
2675+ vpc_config = vpc_config ,
2676+ tags = tags ,
2677+ )
26692678
26702679 def create_model_package_from_algorithm (self , name , description , algorithm_arn , model_data ):
26712680 """Create a SageMaker Model Package from the results of training with an Algorithm Package.
0 commit comments