class_docstr: A class for creating and interacting with SageMaker AutoML jobs.
docstr: Initialize the an AutoML object.
  
  Args:
      role (str): The ARN of the role that is used to create the job and access the data.
      target_attribute_name (str): The name of the target variable
          in supervised learning.
      output_kms_key (str): The AWS KMS encryption key ID for output data configuration
      output_path (str): The Amazon S3 output path. Must be 128 characters or less.
      base_job_name (str): The name of AutoML job.
          The name must be unique to within the AWS account and is case-insensitive.
      compression_type (str): The compression type for input data. Gzip or None.
      sagemaker_session (sagemaker.session.Session): A SageMaker Session
          object, used for SageMaker interactions.
      volume_kms_key (str): The key used to encrypt stored data.
      encrypt_inter_container_traffic (bool): whether to use traffic encryption
          between the container layers.
      vpc_config (dict): Specifies a VPC that your training jobs and hosted models have
          access to. Contents include "SecurityGroupIds" and "Subnets".
      problem_type (str): Defines the type of supervised learning
          available for the candidates.
      max_candidates (int): The maximum number of times a training job is allowed to run.
      max_runtime_per_training_job_in_seconds (int): The maximum time, in seconds,
          that each training job executed inside hyperparameter tuning
          is allowed to run as part of a hyperparameter tuning job.
      total_job_runtime_in_seconds (int): the total wait time of an AutoML job.
      job_objective (dict[str, str]): Defines the objective metric
          used to measure the predictive quality of an AutoML job.
          In the format of: {"MetricName": str}
      generate_candidate_definitions_only (bool): Whether to generates
          possible candidates without training the models.
      tags (Optional[Tags]): Tags to attach to this specific endpoint.
      content_type (str): The content type of the data from the input source.
      s3_data_type (str): The data type for S3 data source.
          Valid values: ManifestFile or S3Prefix.
      feature_specification_s3_uri (str): A URL to the Amazon S3 data source containing
          selected features and specified data types
          from the input data source of an AutoML job.
      validation_fraction (float): A float that specifies the portion of
          the input dataset to be used for validation.
      mode (str): The method that AutoML job uses to train the model.
          Valid values: AUTO or ENSEMBLING or HYPERPARAMETER_TUNING.
      auto_generate_endpoint_name (bool): Whether to automatically generate
          an endpoint name for a one-click Autopilot model deployment.
          If set auto_generate_endpoint_name to True, do not specify the endpoint_name.
      endpoint_name (str): Specifies the endpoint name to use for a one-click AutoML
          model deployment if the endpoint name is not generated automatically.
          Specify the endpoint_name if and only if
          auto_generate_endpoint_name is set to False
      sample_weight_attribute_name (str): The name of dataset column representing
          sample weights.
  
  Returns:
      AutoML object.
docstr_tok: ["Initialize","the","an","AutoML","object",".","Args",":","role","(","str",")",":","The","ARN","of","the","role","that","is","used","to","create","the","job","and","access","the","data",".","target_attribute_name","(","str",")",":","The","name","of","the","target","variable","in","supervised","learning",".","output_kms_key","(","str",")",":","The","AWS","KMS","encryption","key","ID","for","output","data","configuration","output_path","(","str",")",":","The","Amazon","S3","output","path",".","Must","be","128","characters","or","less",".","base_job_name","(","str",")",":","The","name","of","AutoML","job",".","The","name","must","be","unique","to","within","the","AWS","account","and","is","case-insensitive",".","compression_type","(","str",")",":","The","compression","type","for","input","data",".","Gzip","or","None",".","sagemaker_session","(","sagemaker.session.Session",")",":","A","SageMaker","Session","object",",","used","for","SageMaker","interactions",".","volume_kms_key","(","str",")",":","The","key","used","to","encrypt","stored","data",".","encrypt_inter_container_traffic","(","bool",")",":","whether","to","use","traffic","encryption","between","the","container","layers",".","vpc_config","(","dict",")",":","Specifies","a","VPC","that","your","training","jobs","and","hosted","models","have","access","to",".","Contents","include","``","SecurityGroupIds","''","and","``","Subnets","''",".","problem_type","(","str",")",":","Defines","the","type","of","supervised","learning","available","for","the","candidates",".","max_candidates","(","int",")",":","The","maximum","number","of","times","a","training","job","is","allowed","to","run",".","max_runtime_per_training_job_in_seconds","(","int",")",":","The","maximum","time",",","in","seconds",",","that","each","training","job","executed","inside","hyperparameter","tuning","is","allowed","to","run","as","part","of","a","hyperparameter","tuning","job",".","total_job_runtime_in_seconds","(","int",")",":","the","total","wait","time","of","an","AutoML","job",".","job_objective","(","dict","[","str",",","str","]",")",":","Defines","the","objective","metric","used","to","measure","the","predictive","quality","of","an","AutoML","job",".","In","the","format","of",":","{","``","MetricName","''",":","str","}","generate_candidate_definitions_only","(","bool",")",":","Whether","to","generates","possible","candidates","without","training","the","models",".","tags","(","Optional","[","Tags","]",")",":","Tags","to","attach","to","this","specific","endpoint",".","content_type","(","str",")",":","The","content","type","of","the","data","from","the","input","source",".","s3_data_type","(","str",")",":","The","data","type","for","S3","data","source",".","Valid","values",":","ManifestFile","or","S3Prefix",".","feature_specification_s3_uri","(","str",")",":","A","URL","to","the","Amazon","S3","data","source","containing","selected","features","and","specified","data","types","from","the","input","data","source","of","an","AutoML","job",".","validation_fraction","(","float",")",":","A","float","that","specifies","the","portion","of","the","input","dataset","to","be","used","for","validation",".","mode","(","str",")",":","The","method","that","AutoML","job","uses","to","train","the","model",".","Valid","values",":","AUTO","or","ENSEMBLING","or","HYPERPARAMETER_TUNING",".","auto_generate_endpoint_name","(","bool",")",":","Whether","to","automatically","generate","an","endpoint","name","for","a","one-click","Autopilot","model","deployment",".","If","set","auto_generate_endpoint_name","to","True",",","do","not","specify","the","endpoint_name",".","endpoint_name","(","str",")",":","Specifies","the","endpoint","name","to","use","for","a","one-click","AutoML","model","deployment","if","the","endpoint","name","is","not","generated","automatically",".","Specify","the","endpoint_name","if","and","only","if","auto_generate_endpoint_name","is","set","to","False","sample_weight_attribute_name","(","str",")",":","The","name","of","dataset","column","representing","sample","weights",".","Returns",":","AutoML","object","."]
code: def __init__(
      self,
      role: Optional[str] = None,
      target_attribute_name: str = None,
      output_kms_key: Optional[str] = None,
      output_path: Optional[str] = None,
      base_job_name: Optional[str] = None,
      compression_type: Optional[str] = None,
      sagemaker_session: Optional[Session] = None,
      volume_kms_key: Optional[str] = None,
      encrypt_inter_container_traffic: Optional[bool] = None,
      vpc_config: Optional[Dict[str, List]] = None,
      problem_type: Optional[str] = None,
      max_candidates: Optional[int] = None,
      max_runtime_per_training_job_in_seconds: Optional[int] = None,
      total_job_runtime_in_seconds: Optional[int] = None,
      job_objective: Optional[Dict[str, str]] = None,
      generate_candidate_definitions_only: Optional[bool] = False,
      tags: Optional[Tags] = None,
      content_type: Optional[str] = None,
      s3_data_type: Optional[str] = None,
      feature_specification_s3_uri: Optional[str] = None,
      validation_fraction: Optional[float] = None,
      mode: Optional[str] = None,
      auto_generate_endpoint_name: Optional[bool] = None,
      endpoint_name: Optional[str] = None,
      sample_weight_attribute_name: str = None,
  ):
      """Initialize the an AutoML object.
  
      Args:
          role (str): The ARN of the role that is used to create the job and access the data.
          target_attribute_name (str): The name of the target variable
              in supervised learning.
          output_kms_key (str): The AWS KMS encryption key ID for output data configuration
          output_path (str): The Amazon S3 output path. Must be 128 characters or less.
          base_job_name (str): The name of AutoML job.
              The name must be unique to within the AWS account and is case-insensitive.
          compression_type (str): The compression type for input data. Gzip or None.
          sagemaker_session (sagemaker.session.Session): A SageMaker Session
              object, used for SageMaker interactions.
          volume_kms_key (str): The key used to encrypt stored data.
          encrypt_inter_container_traffic (bool): whether to use traffic encryption
              between the container layers.
          vpc_config (dict): Specifies a VPC that your training jobs and hosted models have
              access to. Contents include "SecurityGroupIds" and "Subnets".
          problem_type (str): Defines the type of supervised learning
              available for the candidates.
          max_candidates (int): The maximum number of times a training job is allowed to run.
          max_runtime_per_training_job_in_seconds (int): The maximum time, in seconds,
              that each training job executed inside hyperparameter tuning
              is allowed to run as part of a hyperparameter tuning job.
          total_job_runtime_in_seconds (int): the total wait time of an AutoML job.
          job_objective (dict[str, str]): Defines the objective metric
              used to measure the predictive quality of an AutoML job.
              In the format of: {"MetricName": str}
          generate_candidate_definitions_only (bool): Whether to generates
              possible candidates without training the models.
          tags (Optional[Tags]): Tags to attach to this specific endpoint.
          content_type (str): The content type of the data from the input source.
          s3_data_type (str): The data type for S3 data source.
              Valid values: ManifestFile or S3Prefix.
          feature_specification_s3_uri (str): A URL to the Amazon S3 data source containing
              selected features and specified data types
              from the input data source of an AutoML job.
          validation_fraction (float): A float that specifies the portion of
              the input dataset to be used for validation.
          mode (str): The method that AutoML job uses to train the model.
              Valid values: AUTO or ENSEMBLING or HYPERPARAMETER_TUNING.
          auto_generate_endpoint_name (bool): Whether to automatically generate
              an endpoint name for a one-click Autopilot model deployment.
              If set auto_generate_endpoint_name to True, do not specify the endpoint_name.
          endpoint_name (str): Specifies the endpoint name to use for a one-click AutoML
              model deployment if the endpoint name is not generated automatically.
              Specify the endpoint_name if and only if
              auto_generate_endpoint_name is set to False
          sample_weight_attribute_name (str): The name of dataset column representing
              sample weights.
  
      Returns:
          AutoML object.
      """
      self.output_path = output_path
      self.base_job_name = base_job_name
      self.compression_type = compression_type
      self.encrypt_inter_container_traffic = (
          encrypt_inter_container_traffic
      )
      self.problem_type = problem_type
      self.max_candidate = max_candidates
      self.max_runtime_per_training_job_in_seconds = (
          max_runtime_per_training_job_in_seconds
      )
      self.total_job_runtime_in_seconds = total_job_runtime_in_seconds
      self.target_attribute_name = target_attribute_name
      self.job_objective = job_objective
      self.generate_candidate_definitions_only = (
          generate_candidate_definitions_only
      )
      self.tags = format_tags(tags)
      self.content_type = content_type
      self.s3_data_type = s3_data_type
      self.feature_specification_s3_uri = feature_specification_s3_uri
      self.validation_fraction = validation_fraction
      self.mode = mode
      self.auto_generate_endpoint_name = auto_generate_endpoint_name
      self.endpoint_name = endpoint_name
  
      self.current_job_name = None
      self._auto_ml_job_desc = None
      self._best_candidate = None
      self.sagemaker_session = sagemaker_session or Session()
      self.vpc_config = resolve_value_from_config(
          vpc_config,
          AUTO_ML_VPC_CONFIG_PATH,
          sagemaker_session=self.sagemaker_session,
      )
      self.volume_kms_key = resolve_value_from_config(
          volume_kms_key,
          AUTO_ML_VOLUME_KMS_KEY_ID_PATH,
          sagemaker_session=self.sagemaker_session,
      )
      self.output_kms_key = resolve_value_from_config(
          output_kms_key,
          AUTO_ML_KMS_KEY_ID_PATH,
          sagemaker_session=self.sagemaker_session,
      )
      self.role = resolve_value_from_config(
          role,
          AUTO_ML_ROLE_ARN_PATH,
          sagemaker_session=self.sagemaker_session,
      )
      if not self.role:
          # Originally IAM role was a required parameter.
          # Now we marked that as Optional because we can fetch it from SageMakerConfig
          # Because of marking that parameter as optional, we should validate if it is None, even
          # after fetching the config.
          raise ValueError(
              "An AWS IAM role is required to create an AutoML job."
          )
  
      self.encrypt_inter_container_traffic = resolve_value_from_config(
          direct_input=encrypt_inter_container_traffic,
          config_path=AUTO_ML_INTER_CONTAINER_ENCRYPTION_PATH,
          default_value=False,
          sagemaker_session=self.sagemaker_session,
      )
  
      self._check_problem_type_and_job_objective(
          self.problem_type, self.job_objective
      )
      self.sample_weight_attribute_name = sample_weight_attribute_name
  
imports: from __future__ import absolute_import
  import logging
  from typing import Optional, List, Dict
  from six import string_types
  from sagemaker import Model, PipelineModel, s3
  from sagemaker.automl.candidate_estimator import CandidateEstimator
  from sagemaker.config import AUTO_ML_ROLE_ARN_PATH, AUTO_ML_KMS_KEY_ID_PATH, AUTO_ML_VPC_CONFIG_PATH, AUTO_ML_VOLUME_KMS_KEY_ID_PATH, AUTO_ML_INTER_CONTAINER_ENCRYPTION_PATH
  from sagemaker.job import _Job
  from sagemaker.session import Session
  from sagemaker.utils import name_from_base, resolve_value_from_config, format_tags, Tags
  from sagemaker.workflow.entities import PipelineVariable
  from sagemaker.workflow.pipeline_context import runnable_by_pipeline
label_desc: Use image node_id 1 to create a new AutoML object from inherited base classes: object with example: obj = AutoML(role, target_attribute_name, output_kms_key, output_path, base_job_name, compression_type, sagemaker_session, volume_kms_key, encrypt_inter_container_traffic, vpc_config, problem_type, max_candidates, max_runtime_per_training_job_in_seconds, total_job_runtime_in_seconds, job_objective, generate_candidate_definitions_only, tags, content_type, s3_data_type, feature_specification_s3_uri, validation_fraction, mode, auto_generate_endpoint_name, endpoint_name, sample_weight_attribute_name)