@@ -326,7 +326,8 @@ def attach(cls, tuning_job_name, sagemaker_session=None, job_details=None, estim
326326
327327 return tuner
328328
329- def deploy (self , initial_instance_count , instance_type , accelerator_type = None , endpoint_name = None , ** kwargs ):
329+ def deploy (self , initial_instance_count , instance_type , accelerator_type = None , endpoint_name = None , wait = True ,
330+ ** kwargs ):
330331 """Deploy the best trained or user specified model to an Amazon SageMaker endpoint and return a
331332 ``sagemaker.RealTimePredictor`` object.
332333
@@ -342,6 +343,7 @@ def deploy(self, initial_instance_count, instance_type, accelerator_type=None, e
342343 For more information: https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html
343344 endpoint_name (str): Name to use for creating an Amazon SageMaker endpoint. If not specified,
344345 the name of the training job is used.
346+ wait (bool): Whether the call should wait until the deployment of model completes (default: True).
345347 **kwargs: Other arguments needed for deployment. Please refer to the ``create_model()`` method of
346348 the associated estimator to see what other arguments are needed.
347349
@@ -354,7 +356,7 @@ def deploy(self, initial_instance_count, instance_type, accelerator_type=None, e
354356 sagemaker_session = self .estimator .sagemaker_session )
355357 return best_estimator .deploy (initial_instance_count , instance_type ,
356358 accelerator_type = accelerator_type ,
357- endpoint_name = endpoint_name , ** kwargs )
359+ endpoint_name = endpoint_name , wait = wait , ** kwargs )
358360
359361 def stop_tuning_job (self ):
360362 """Stop latest running hyperparameter tuning job.
0 commit comments