@@ -238,7 +238,7 @@ def train(self, image, input_mode, input_config, role, job_name, output_config,
238238 LOGGER .debug ('train request: {}' .format (json .dumps (train_request , indent = 4 )))
239239 self .sagemaker_client .create_training_job (** train_request )
240240
241- def create_model (self , name , role , primary_container , supplemental_containers = None ):
241+ def create_model (self , name , role , primary_container ):
242242 """Create an Amazon SageMaker ``Model``.
243243
244244 Specify the S3 location of the model artifacts and Docker image containing
@@ -253,36 +253,27 @@ def create_model(self, name, role, primary_container, supplemental_containers=No
253253 primary_container (str or dict[str, str]): Docker image which defines the inference code.
254254 You can also specify the return value of ``sagemaker.container_def()``, which is used to create
255255 more advanced container configurations, including model containers which need artifacts from S3.
256- supplemental_containers (list[str or dict[str, str]]): List of Docker images which define
257- additional containers that need to be run in addition to the primary container (default: None).
258- You can also specify the return values of ``sagemaker.container_def()``, which the API uses to create
259- more advanced container configurations, including model containers which need artifacts from S3.
260256
261257 Returns:
262258 str: Name of the Amazon SageMaker ``Model`` created.
263259 """
264260 role = self .expand_role (role )
265261 primary_container = _expand_container_def (primary_container )
266- if supplemental_containers is None :
267- supplemental_containers = []
268- supplemental_containers = [_expand_container_def (sc ) for sc in supplemental_containers ]
269262 LOGGER .info ('Creating model with name: {}' .format (name ))
270263 LOGGER .debug ("create_model request: {}" .format ({
271264 'name' : name ,
272265 'role' : role ,
273- 'primary_container' : primary_container ,
274- 'supplemental_containers' : supplemental_containers
266+ 'primary_container' : primary_container
275267 }))
276268
277269 self .sagemaker_client .create_model (ModelName = name ,
278270 PrimaryContainer = primary_container ,
279- SupplementalContainers = supplemental_containers ,
280271 ExecutionRoleArn = role )
281272
282273 return name
283274
284275 def create_model_from_job (self , training_job_name , name = None , role = None , primary_container_image = None ,
285- model_data_url = None , env = {}, supplemental_containers = None ):
276+ model_data_url = None , env = {}):
286277 """Create an Amazon SageMaker ``Model`` from a SageMaker Training Job.
287278
288279 Args:
@@ -296,8 +287,6 @@ def create_model_from_job(self, training_job_name, name=None, role=None, primary
296287 model_data_url (str): S3 location of the model data (default: None). If None, defaults to
297288 the ``ModelS3Artifacts`` of ``training_job_name``.
298289 env (dict[string,string]): Model environment variables (default: {}).
299- supplemental_containers (list[dict[str, str]]): A list of supplemental Docker containers
300- (default: None). Defines the ``SupplementalContainers`` property on the created ``Model``.
301290
302291 Returns:
303292 str: The name of the created ``Model``.
@@ -309,7 +298,7 @@ def create_model_from_job(self, training_job_name, name=None, role=None, primary
309298 primary_container_image or training_job ['AlgorithmSpecification' ]['TrainingImage' ],
310299 model_data_url = model_data_url or training_job ['ModelArtifacts' ]['S3ModelArtifacts' ],
311300 env = env )
312- return self .create_model (name , role , primary_container , supplemental_containers )
301+ return self .create_model (name , role , primary_container )
313302
314303 def create_endpoint_config (self , name , model_name , initial_instance_count , instance_type ):
315304 """Create an Amazon SageMaker endpoint configuration.
0 commit comments