@@ -331,7 +331,7 @@ def delete_endpoint(self):
331331
332332 def transformer (self , instance_count , instance_type , strategy = None , assemble_with = None , output_path = None ,
333333 output_kms_key = None , accept = None , env = None , max_concurrent_transforms = None ,
334- max_payload = None , tags = None , role = None ):
334+ max_payload = None , tags = None , role = None , volume_kms_key = None ):
335335 """Return a ``Transformer`` that uses a SageMaker Model based on the training job. It reuses the
336336 SageMaker Session and base job name used by the Estimator.
337337
@@ -353,6 +353,8 @@ def transformer(self, instance_count, instance_type, strategy=None, assemble_wit
353353 the training job are used for the transform job.
354354 role (str): The ``ExecutionRoleArn`` IAM Role ARN for the ``Model``, which is also used during
355355 transform jobs. If not specified, the role from the Estimator will be used.
356+ volume_kms_key (str): Optional. KMS key ID for encrypting the volume attached to the ML
357+ compute instance (default: None).
356358 """
357359 self ._ensure_latest_training_job ()
358360
@@ -363,7 +365,7 @@ def transformer(self, instance_count, instance_type, strategy=None, assemble_wit
363365 output_path = output_path , output_kms_key = output_kms_key , accept = accept ,
364366 max_concurrent_transforms = max_concurrent_transforms , max_payload = max_payload ,
365367 env = env , tags = tags , base_transform_job_name = self .base_job_name ,
366- sagemaker_session = self .sagemaker_session )
368+ volume_kms_key = volume_kms_key , sagemaker_session = self .sagemaker_session )
367369
368370 @property
369371 def training_job_analytics (self ):
@@ -767,7 +769,7 @@ def _update_init_params(cls, hp, tf_arguments):
767769
768770 def transformer (self , instance_count , instance_type , strategy = None , assemble_with = None , output_path = None ,
769771 output_kms_key = None , accept = None , env = None , max_concurrent_transforms = None ,
770- max_payload = None , tags = None , role = None , model_server_workers = None ):
772+ max_payload = None , tags = None , role = None , model_server_workers = None , volume_kms_key = None ):
771773 """Return a ``Transformer`` that uses a SageMaker Model based on the training job. It reuses the
772774 SageMaker Session and base job name used by the Estimator.
773775
@@ -791,6 +793,8 @@ def transformer(self, instance_count, instance_type, strategy=None, assemble_wit
791793 transform jobs. If not specified, the role from the Estimator will be used.
792794 model_server_workers (int): Optional. The number of worker processes used by the inference server.
793795 If None, server will use one worker per vCPU.
796+ volume_kms_key (str): Optional. KMS key ID for encrypting the volume attached to the ML
797+ compute instance (default: None).
794798 """
795799 self ._ensure_latest_training_job ()
796800 role = role or self .role
@@ -810,7 +814,7 @@ def transformer(self, instance_count, instance_type, strategy=None, assemble_wit
810814 output_path = output_path , output_kms_key = output_kms_key , accept = accept ,
811815 max_concurrent_transforms = max_concurrent_transforms , max_payload = max_payload ,
812816 env = transform_env , tags = tags , base_transform_job_name = self .base_job_name ,
813- sagemaker_session = self .sagemaker_session )
817+ volume_kms_key = volume_kms_key , sagemaker_session = self .sagemaker_session )
814818
815819
816820def _s3_uri_prefix (channel_name , s3_data ):
0 commit comments