class_docstr: Register model step in workflow that creates a model package.
class_docstr_tok: ["Register","model","step","in","workflow","that","creates","a","model","package","."]
docstr: Constructor of a register model step.
  
  Args:
      name (str): The name of the training step.
      step_args (dict): The arguments for this `_RegisterModelStep` definition
          (default: None).
      content_types (list): The supported MIME types for the input data (default: None).
      response_types (list): The supported MIME types for the output data (default: None).
      inference_instances (list): A list of the instance types that are used to
          generate inferences in real-time (default: None).
      transform_instances (list): A list of the instance types on which a
          transformation job can be run or on which an endpoint
          can be deployed (default: None).
      estimator (EstimatorBase): A `sagemaker.estimator.EstimatorBase` instance
          (default: None).
      model_data: the S3 URI to the model data from training (default: None).
      model_package_group_name (str): Model Package Group name, exclusive to
          `model_package_name`, using `model_package_group_name`
          makes the Model Package versioned (default: None).
      model_metrics (ModelMetrics): ModelMetrics object (default: None).
      metadata_properties (MetadataProperties): MetadataProperties object (default: None).
      approval_status (str): Model Approval Status, values can be "Approved",
          "Rejected", or "PendingManualApproval" (default: "PendingManualApproval").
      image_uri (str): The container image uri for Model Package, if not specified,
          Estimator's training container image will be used (default: None).
      compile_model_family (str): Instance family for compiled model,
          if specified, a compiled model will be used (default: None).
      display_name (str): The display name of this `_RegisterModelStep` step (default: None).
      description (str): Model Package description (default: None).
      depends_on (List[Union[str, Step, StepCollection]]): The list of `Step`/`StepCollection`
          names or `Step` instances or `StepCollection` instances that the current `Step`
          depends on (default: None).
      retry_policies (List[RetryPolicy]): The list of retry policies for the current step
          (default: None).
      tags (Optional[Tags]): A list of dictionaries containing key-value pairs used to
          configure the create model package request (default: None).
      container_def_list (list): A list of container definitions (default: None).
      drift_check_baselines (DriftCheckBaselines): DriftCheckBaselines object (default: None).
      customer_metadata_properties (dict[str, str]): A dictionary of key-value paired
          metadata properties (default: None).
      domain (str): Domain values can be "COMPUTER_VISION", "NATURAL_LANGUAGE_PROCESSING",
          "MACHINE_LEARNING" (default: None).
      sample_payload_url (str): The S3 path where the sample payload is stored
          (default: None).
      task (str): Task values which are supported by Inference Recommender are "FILL_MASK",
          "IMAGE_CLASSIFICATION", "OBJECT_DETECTION", "TEXT_GENERATION", "IMAGE_SEGMENTATION",
          "CLASSIFICATION", "REGRESSION", "OTHER" (default: None).
      skip_model_validation (str): Indicates if you want to skip model validation.
          Values can be "All" or "None" (default: None).
      **kwargs: additional arguments to `create_model`.
docstr_tok: ["Constructor","of","a","register","model","step",".","Args",":","name","(","str",")",":","The","name","of","the","training","step",".","step_args","(","dict",")",":","The","arguments","for","this","`","_RegisterModelStep","`","definition","(","default",":","None",")",".","content_types","(","list",")",":","The","supported","MIME","types","for","the","input","data","(","default",":","None",")",".","response_types","(","list",")",":","The","supported","MIME","types","for","the","output","data","(","default",":","None",")",".","inference_instances","(","list",")",":","A","list","of","the","instance","types","that","are","used","to","generate","inferences","in","real-time","(","default",":","None",")",".","transform_instances","(","list",")",":","A","list","of","the","instance","types","on","which","a","transformation","job","can","be","run","or","on","which","an","endpoint","can","be","deployed","(","default",":","None",")",".","estimator","(","EstimatorBase",")",":","A","`","sagemaker.estimator.EstimatorBase","`","instance","(","default",":","None",")",".","model_data",":","the","S3","URI","to","the","model","data","from","training","(","default",":","None",")",".","model_package_group_name","(","str",")",":","Model","Package","Group","name",",","exclusive","to","`","model_package_name","`",",","using","`","model_package_group_name","`","makes","the","Model","Package","versioned","(","default",":","None",")",".","model_metrics","(","ModelMetrics",")",":","ModelMetrics","object","(","default",":","None",")",".","metadata_properties","(","MetadataProperties",")",":","MetadataProperties","object","(","default",":","None",")",".","approval_status","(","str",")",":","Model","Approval","Status",",","values","can","be","``","Approved","''",",","``","Rejected","''",",","or","``","PendingManualApproval","''","(","default",":","``","PendingManualApproval","''",")",".","image_uri","(","str",")",":","The","container","image","uri","for","Model","Package",",","if","not","specified",",","Estimator","'s","training","container","image","will","be","used","(","default",":","None",")",".","compile_model_family","(","str",")",":","Instance","family","for","compiled","model",",","if","specified",",","a","compiled","model","will","be","used","(","default",":","None",")",".","display_name","(","str",")",":","The","display","name","of","this","`","_RegisterModelStep","`","step","(","default",":","None",")",".","description","(","str",")",":","Model","Package","description","(","default",":","None",")",".","depends_on","(","List","[","Union","[","str",",","Step",",","StepCollection","]","]",")",":","The","list","of","`","Step","`","\/","`","StepCollection","`","names","or","`","Step","`","instances","or","`","StepCollection","`","instances","that","the","current","`","Step","`","depends","on","(","default",":","None",")",".","retry_policies","(","List","[","RetryPolicy","]",")",":","The","list","of","retry","policies","for","the","current","step","(","default",":","None",")",".","tags","(","Optional","[","Tags","]",")",":","A","list","of","dictionaries","containing","key-value","pairs","used","to","configure","the","create","model","package","request","(","default",":","None",")",".","container_def_list","(","list",")",":","A","list","of","container","definitions","(","default",":","None",")",".","drift_check_baselines","(","DriftCheckBaselines",")",":","DriftCheckBaselines","object","(","default",":","None",")",".","customer_metadata_properties","(","dict","[","str",",","str","]",")",":","A","dictionary","of","key-value","paired","metadata","properties","(","default",":","None",")",".","domain","(","str",")",":","Domain","values","can","be","``","COMPUTER_VISION","''",",","``","NATURAL_LANGUAGE_PROCESSING","''",",","``","MACHINE_LEARNING","''","(","default",":","None",")",".","sample_payload_url","(","str",")",":","The","S3","path","where","the","sample","payload","is","stored","(","default",":","None",")",".","task","(","str",")",":","Task","values","which","are","supported","by","Inference","Recommender","are","``","FILL_MASK","''",",","``","IMAGE_CLASSIFICATION","''",",","``","OBJECT_DETECTION","''",",","``","TEXT_GENERATION","''",",","``","IMAGE_SEGMENTATION","''",",","``","CLASSIFICATION","''",",","``","REGRESSION","''",",","``","OTHER","''","(","default",":","None",")",".","skip_model_validation","(","str",")",":","Indicates","if","you","want","to","skip","model","validation",".","Values","can","be","``","All","''","or","``","None","''","(","default",":","None",")",".","*","*","kwargs",":","additional","arguments","to","`","create_model","`","."]
code: def __init__(
      self,
      name: str,
      step_args: Optional[dict] = None,
      content_types: Optional[list] = None,
      response_types: Optional[list] = None,
      inference_instances: Optional[list] = None,
      transform_instances: Optional[list] = None,
      estimator: EstimatorBase = None,
      model_data=None,
      model_package_group_name=None,
      model_metrics=None,
      metadata_properties=None,
      approval_status="PendingManualApproval",
      image_uri=None,
      compile_model_family=None,
      display_name: str = None,
      description=None,
      depends_on: Optional[
          List[Union[str, Step, "StepCollection"]]
      ] = None,
      retry_policies: Optional[List[RetryPolicy]] = None,
      tags=None,
      container_def_list=None,
      drift_check_baselines=None,
      customer_metadata_properties=None,
      domain=None,
      sample_payload_url=None,
      task=None,
      skip_model_validation=None,
      **kwargs,
  ):
      """Constructor of a register model step.
  
      Args:
          name (str): The name of the training step.
          step_args (dict): The arguments for this `_RegisterModelStep` definition
              (default: None).
          content_types (list): The supported MIME types for the input data (default: None).
          response_types (list): The supported MIME types for the output data (default: None).
          inference_instances (list): A list of the instance types that are used to
              generate inferences in real-time (default: None).
          transform_instances (list): A list of the instance types on which a
              transformation job can be run or on which an endpoint
              can be deployed (default: None).
          estimator (EstimatorBase): A `sagemaker.estimator.EstimatorBase` instance
              (default: None).
          model_data: the S3 URI to the model data from training (default: None).
          model_package_group_name (str): Model Package Group name, exclusive to
              `model_package_name`, using `model_package_group_name`
              makes the Model Package versioned (default: None).
          model_metrics (ModelMetrics): ModelMetrics object (default: None).
          metadata_properties (MetadataProperties): MetadataProperties object (default: None).
          approval_status (str): Model Approval Status, values can be "Approved",
              "Rejected", or "PendingManualApproval" (default: "PendingManualApproval").
          image_uri (str): The container image uri for Model Package, if not specified,
              Estimator's training container image will be used (default: None).
          compile_model_family (str): Instance family for compiled model,
              if specified, a compiled model will be used (default: None).
          display_name (str): The display name of this `_RegisterModelStep` step (default: None).
          description (str): Model Package description (default: None).
          depends_on (List[Union[str, Step, StepCollection]]): The list of `Step`/`StepCollection`
              names or `Step` instances or `StepCollection` instances that the current `Step`
              depends on (default: None).
          retry_policies (List[RetryPolicy]): The list of retry policies for the current step
              (default: None).
          tags (Optional[Tags]): A list of dictionaries containing key-value pairs used to
              configure the create model package request (default: None).
          container_def_list (list): A list of container definitions (default: None).
          drift_check_baselines (DriftCheckBaselines): DriftCheckBaselines object (default: None).
          customer_metadata_properties (dict[str, str]): A dictionary of key-value paired
              metadata properties (default: None).
          domain (str): Domain values can be "COMPUTER_VISION", "NATURAL_LANGUAGE_PROCESSING",
              "MACHINE_LEARNING" (default: None).
          sample_payload_url (str): The S3 path where the sample payload is stored
              (default: None).
          task (str): Task values which are supported by Inference Recommender are "FILL_MASK",
              "IMAGE_CLASSIFICATION", "OBJECT_DETECTION", "TEXT_GENERATION", "IMAGE_SEGMENTATION",
              "CLASSIFICATION", "REGRESSION", "OTHER" (default: None).
          skip_model_validation (str): Indicates if you want to skip model validation.
              Values can be "All" or "None" (default: None).
          **kwargs: additional arguments to `create_model`.
      """
      super(_RegisterModelStep, self).__init__(
          name,
          StepTypeEnum.REGISTER_MODEL,
          display_name,
          description,
          depends_on,
          retry_policies,
      )
      deprecated_args_missing = (
          content_types is None or response_types is None
      )
      if not (step_args is None) ^ deprecated_args_missing:
          raise ValueError(
              "step_args and the set of (content_types, response_types, "
              ") are mutually exclusive. "
              "Either of them should be provided."
          )
  
      self.step_args = step_args
      self.estimator = estimator
      self.model_data = model_data
      self.content_types = content_types
      self.response_types = response_types
      self.inference_instances = inference_instances
      self.transform_instances = transform_instances
      self.model_package_group_name = model_package_group_name
      self.tags = format_tags(tags)
      self.model_metrics = model_metrics
      self.drift_check_baselines = drift_check_baselines
      self.customer_metadata_properties = customer_metadata_properties
      self.domain = domain
      self.sample_payload_url = sample_payload_url
      self.task = task
      self.metadata_properties = metadata_properties
      self.approval_status = approval_status
      self.image_uri = image_uri
      self.compile_model_family = compile_model_family
      self.description = description
      self.kwargs = kwargs
      self.container_def_list = container_def_list
      self.skip_model_validation = skip_model_validation
  
      self._properties = Properties(
          step_name=name,
          step=self,
          shape_name="DescribeModelPackageOutput",
      )
  
imports: from __future__ import absolute_import
  import logging
  import os
  import shutil
  import tarfile
  import tempfile
  from typing import List, Union, Optional, TYPE_CHECKING
  from sagemaker import image_uris
  from sagemaker.inputs import TrainingInput
  from sagemaker.estimator import EstimatorBase
  from sagemaker.sklearn.estimator import SKLearn
  from sagemaker.workflow.entities import RequestType
  from sagemaker.workflow.properties import Properties
  from sagemaker.session import get_create_model_package_request, get_model_package_args
  from sagemaker.workflow.steps import StepTypeEnum, TrainingStep, Step, ConfigurableRetryStep
  from sagemaker.utils import _save_model, download_file_from_url, format_tags
  from sagemaker.workflow.retry import RetryPolicy
  from sagemaker.workflow.utilities import trim_request_dict
label_desc: Use image node_id 1 to create a new _RegisterModelStep object from inherited base classes: ConfigurableRetryStep with example: obj = _RegisterModelStep(name, step_args, content_types, response_types, inference_instances, transform_instances, estimator, model_data, model_package_group_name, model_metrics, metadata_properties, approval_status, image_uri, compile_model_family, display_name, description, depends_on, retry_policies, tags, container_def_list, drift_check_baselines, customer_metadata_properties, domain, sample_payload_url, task, skip_model_validation)