@@ -2625,6 +2625,7 @@ def create_model_from_job(
2625
2625
image_uri = None ,
2626
2626
model_data_url = None ,
2627
2627
env = None ,
2628
+ enable_network_isolation = False ,
2628
2629
vpc_config_override = vpc_utils .VPC_CONFIG_DEFAULT ,
2629
2630
tags = None ,
2630
2631
):
@@ -2642,6 +2643,7 @@ def create_model_from_job(
2642
2643
model_data_url (str): S3 location of the model data (default: None). If None, defaults
2643
2644
to the ``ModelS3Artifacts`` of ``training_job_name``.
2644
2645
env (dict[string,string]): Model environment variables (default: {}).
2646
+ enable_network_isolation (bool): Whether the model requires network isolation or not.
2645
2647
vpc_config_override (dict[str, list[str]]): Optional override for VpcConfig set on the
2646
2648
model.
2647
2649
Default: use VpcConfig from training job.
@@ -2665,7 +2667,14 @@ def create_model_from_job(
2665
2667
env = env ,
2666
2668
)
2667
2669
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
+ )
2669
2678
2670
2679
def create_model_package_from_algorithm (self , name , description , algorithm_arn , model_data ):
2671
2680
"""Create a SageMaker Model Package from the results of training with an Algorithm Package.
0 commit comments