class_docstr: Hook for Google Cloud Vertex AI Auto ML APIs.
class_docstr_tok: ["Hook","for","Google","Cloud","Vertex","AI","Auto","ML","APIs","."]
docstr: Create an AutoML Image Training Job.
  
  :param project_id: Required. Project to run training in.
  :param region: Required. Location to run training in.
  :param display_name: Required. The user-defined name of this TrainingPipeline.
  :param dataset: Required. The dataset within the same Project from which data will be used to train
      the Model. The Dataset must use schema compatible with Model being trained, and what is
      compatible should be described in the used TrainingPipeline's [training_task_definition]
      [google.cloud.aiplatform.v1beta1.TrainingPipeline.training_task_definition]. For tabular
      Datasets, all their data is exported to training, to pick and choose from.
  :param prediction_type: The type of prediction the Model is to produce, one of:
      "classification" - Predict one out of multiple target values is picked for each row.
      "object_detection" - Predict a value based on its relation to other values. This type is
      available only to columns that contain semantically numeric values, i.e. integers or floating
      point number, even if stored as e.g. strings.
  :param parent_model: Optional. The resource name or model ID of an existing model.
      The new model uploaded by this job will be a version of `parent_model`.
      Only set this field when training a new version of an existing model.
  :param is_default_version: Optional. When set to True, the newly uploaded model version will
      automatically have alias "default" included. Subsequent uses of
      the model produced by this job without a version specified will
      use this "default" version.
      When set to False, the "default" alias will not be moved.
      Actions targeting the model version produced by this job will need
      to specifically reference this version by ID or alias.
      New model uploads, i.e. version 1, will always be "default" aliased.
  :param model_version_aliases: Optional. User provided version aliases so that the model version
      uploaded by this job can be referenced via alias instead of
      auto-generated version ID. A default version alias will be created
      for the first version of the model.
      The format is [a-z][a-zA-Z0-9-]{0,126}[a-z0-9]
  :param model_version_description: Optional. The description of the model version
      being uploaded by this job.
  :param multi_label: Required. Default is False. If false, a single-label (multi-class) Model will be
      trained (i.e. assuming that for each image just up to one annotation may be applicable). If true,
      a multi-label Model will be trained (i.e. assuming that for each image multiple annotations may
      be applicable).
      This is only applicable for the "classification" prediction_type and will be ignored otherwise.
  :param model_type: Required. One of the following:
      "CLOUD" - Default for Image Classification. A Model best tailored to be used within Google Cloud,
      and which cannot be exported.
      "CLOUD_HIGH_ACCURACY_1" - Default for Image Object Detection. A model best tailored to be used
      within Google Cloud, and which cannot be exported. Expected to have a higher latency, but should
      also have a higher prediction quality than other cloud models.
      "CLOUD_LOW_LATENCY_1" - A model best tailored to be used within Google Cloud, and which cannot be
      exported. Expected to have a low latency, but may have lower prediction quality than other cloud
      models.
      "MOBILE_TF_LOW_LATENCY_1" - A model that, in addition to being available within Google Cloud, can
      also be exported as TensorFlow or Core ML model and used on a mobile or edge device afterwards.
      Expected to have low latency, but may have lower prediction quality than other mobile models.
      "MOBILE_TF_VERSATILE_1" - A model that, in addition to being available within Google Cloud, can
      also be exported as TensorFlow or Core ML model and used on a mobile or edge device with
      afterwards.
      "MOBILE_TF_HIGH_ACCURACY_1" - A model that, in addition to being available within Google Cloud,
      can also be exported as TensorFlow or Core ML model and used on a mobile or edge device
      afterwards. Expected to have a higher latency, but should also have a higher prediction quality
      than other mobile models.
  :param base_model: Optional. Only permitted for Image Classification models. If it is specified, the
      new model will be trained based on the `base` model. Otherwise, the new model will be trained
      from scratch. The `base` model must be in the same Project and Location as the new Model to
      train, and have the same model_type.
  :param labels: Optional. The labels with user-defined metadata to organize TrainingPipelines. Label
      keys and values can be no longer than 64 characters (Unicode codepoints), can only contain
      lowercase letters, numeric characters, underscores and dashes. International characters are
      allowed. See https://goo.gl/xmQnxf for more information and examples of labels.
  :param training_encryption_spec_key_name: Optional. The Cloud KMS resource identifier of the customer
      managed encryption key used to protect the training pipeline. Has the form:
      ``projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key``. The key needs to be
      in the same region as where the compute resource is created. If set, this TrainingPipeline will
      be secured by this key.
      Note: Model trained by this TrainingPipeline is also secured by this key if ``model_to_upload``
      is not set separately.
  :param model_encryption_spec_key_name: Optional. The Cloud KMS resource identifier of the customer
      managed encryption key used to protect the model. Has the form:
      ``projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key``.
      The key needs to be in the same region as where the compute resource is created.
      If set, the trained Model will be secured by this key.
  :param training_fraction_split: Optional. The fraction of the input data that is to be used to train
      the Model. This is ignored if Dataset is not provided.
  :param validation_fraction_split: Optional. The fraction of the input data that is to be used to
      validate the Model. This is ignored if Dataset is not provided.
  :param test_fraction_split: Optional. The fraction of the input data that is to be used to evaluate
      the Model. This is ignored if Dataset is not provided.
  :param training_filter_split: Optional. A filter on DataItems of the Dataset. DataItems that match
      this filter are used to train the Model. A filter with same syntax as the one used in
      DatasetService.ListDataItems may be used. If a single DataItem is matched by more than one of the
      FilterSplit filters, then it is assigned to the first set that applies to it in the training,
      validation, test order. This is ignored if Dataset is not provided.
  :param validation_filter_split: Optional. A filter on DataItems of the Dataset. DataItems that match
      this filter are used to validate the Model. A filter with same syntax as the one used in
      DatasetService.ListDataItems may be used. If a single DataItem is matched by more than one of the
      FilterSplit filters, then it is assigned to the first set that applies to it in the training,
      validation, test order. This is ignored if Dataset is not provided.
  :param test_filter_split: Optional. A filter on DataItems of the Dataset. DataItems that match this
      filter are used to test the Model. A filter with same syntax as the one used in
      DatasetService.ListDataItems may be used. If a single DataItem is matched by more than one of the
      FilterSplit filters, then it is assigned to the first set that applies to it in the training,
      validation, test order. This is ignored if Dataset is not provided.
  :param budget_milli_node_hours: Optional. The train budget of creating this Model, expressed in milli
      node hours i.e. 1,000 value in this field means 1 node hour.
      Defaults by `prediction_type`:
      `classification` - For Cloud models the budget must be: 8,000 - 800,000 milli node hours
      (inclusive). The default value is 192,000 which represents one day in wall time, assuming 8 nodes
      are used.
      `object_detection` - For Cloud models the budget must be: 20,000 - 900,000 milli node hours
      (inclusive). The default value is 216,000 which represents one day in wall time, assuming 9 nodes
      are used.
      The training cost of the model will not exceed this budget. The final cost will be attempted to
      be close to the budget, though may end up being (even) noticeably smaller - at the backend's
      discretion. This especially may happen when further model training ceases to provide any
      improvements. If the budget is set to a value known to be insufficient to train a Model for the
      given training set, the training won't be attempted and will error.
  :param model_display_name: Optional. The display name of the managed Vertex AI Model. The name can be
      up to 128 characters long and can be consist of any UTF-8 characters. If not provided upon
      creation, the job's display_name is used.
  :param model_labels: Optional. The labels with user-defined metadata to organize your Models. Label
      keys and values can be no longer than 64 characters (Unicode codepoints), can only contain
      lowercase letters, numeric characters, underscores and dashes. International characters are
      allowed. See https://goo.gl/xmQnxf for more information and examples of labels.
  :param disable_early_stopping: Required. If true, the entire budget is used. This disables the early
      stopping feature. By default, the early stopping feature is enabled, which means that training
      might stop before the entire training budget has been used, if further training does no longer
      brings significant improvement to the model.
  :param sync: Whether to execute this method synchronously. If False, this method will be executed in
      concurrent Future and any downstream object will be immediately returned and synced when the
      Future has completed.
docstr_tok: ["Create","an","AutoML","Image","Training","Job",".",":","param","project_id",":","Required",".","Project","to","run","training","in",".",":","param","region",":","Required",".","Location","to","run","training","in",".",":","param","display_name",":","Required",".","The","user-defined","name","of","this","TrainingPipeline",".",":","param","dataset",":","Required",".","The","dataset","within","the","same","Project","from","which","data","will","be","used","to","train","the","Model",".","The","Dataset","must","use","schema","compatible","with","Model","being","trained",",","and","what","is","compatible","should","be","described","in","the","used","TrainingPipeline","'s","[","training_task_definition","]","[","google.cloud.aiplatform.v1beta1.TrainingPipeline.training_task_definition","]",".","For","tabular","Datasets",",","all","their","data","is","exported","to","training",",","to","pick","and","choose","from",".",":","param","prediction_type",":","The","type","of","prediction","the","Model","is","to","produce",",","one","of",":","``","classification","''","-","Predict","one","out","of","multiple","target","values","is","picked","for","each","row",".","``","object_detection","''","-","Predict","a","value","based","on","its","relation","to","other","values",".","This","type","is","available","only","to","columns","that","contain","semantically","numeric","values",",","i.e",".","integers","or","floating","point","number",",","even","if","stored","as","e.g",".","strings",".",":","param","parent_model",":","Optional",".","The","resource","name","or","model","ID","of","an","existing","model",".","The","new","model","uploaded","by","this","job","will","be","a","version","of","`","parent_model","`",".","Only","set","this","field","when","training","a","new","version","of","an","existing","model",".",":","param","is_default_version",":","Optional",".","When","set","to","True",",","the","newly","uploaded","model","version","will","automatically","have","alias","``","default","''","included",".","Subsequent","uses","of","the","model","produced","by","this","job","without","a","version","specified","will","use","this","``","default","''","version",".","When","set","to","False",",","the","``","default","''","alias","will","not","be","moved",".","Actions","targeting","the","model","version","produced","by","this","job","will","need","to","specifically","reference","this","version","by","ID","or","alias",".","New","model","uploads",",","i.e",".","version","1",",","will","always","be","``","default","''","aliased",".",":","param","model_version_aliases",":","Optional",".","User","provided","version","aliases","so","that","the","model","version","uploaded","by","this","job","can","be","referenced","via","alias","instead","of","auto-generated","version","ID",".","A","default","version","alias","will","be","created","for","the","first","version","of","the","model",".","The","format","is","[","a-z","]","[","a-zA-Z0-9-","]","{","0,126","}","[","a-z0-9","]",":","param","model_version_description",":","Optional",".","The","description","of","the","model","version","being","uploaded","by","this","job",".",":","param","multi_label",":","Required",".","Default","is","False",".","If","false",",","a","single-label","(","multi-class",")","Model","will","be","trained","(","i.e",".","assuming","that","for","each","image","just","up","to","one","annotation","may","be","applicable",")",".","If","true",",","a","multi-label","Model","will","be","trained","(","i.e",".","assuming","that","for","each","image","multiple","annotations","may","be","applicable",")",".","This","is","only","applicable","for","the","``","classification","''","prediction_type","and","will","be","ignored","otherwise",".",":","param","model_type",":","Required",".","One","of","the","following",":","``","CLOUD","''","-","Default","for","Image","Classification",".","A","Model","best","tailored","to","be","used","within","Google","Cloud",",","and","which","can","not","be","exported",".","``","CLOUD_HIGH_ACCURACY_1","''","-","Default","for","Image","Object","Detection",".","A","model","best","tailored","to","be","used","within","Google","Cloud",",","and","which","can","not","be","exported",".","Expected","to","have","a","higher","latency",",","but","should","also","have","a","higher","prediction","quality","than","other","cloud","models",".","``","CLOUD_LOW_LATENCY_1","''","-","A","model","best","tailored","to","be","used","within","Google","Cloud",",","and","which","can","not","be","exported",".","Expected","to","have","a","low","latency",",","but","may","have","lower","prediction","quality","than","other","cloud","models",".","``","MOBILE_TF_LOW_LATENCY_1","''","-","A","model","that",",","in","addition","to","being","available","within","Google","Cloud",",","can","also","be","exported","as","TensorFlow","or","Core","ML","model","and","used","on","a","mobile","or","edge","device","afterwards",".","Expected","to","have","low","latency",",","but","may","have","lower","prediction","quality","than","other","mobile","models",".","``","MOBILE_TF_VERSATILE_1","''","-","A","model","that",",","in","addition","to","being","available","within","Google","Cloud",",","can","also","be","exported","as","TensorFlow","or","Core","ML","model","and","used","on","a","mobile","or","edge","device","with","afterwards",".","``","MOBILE_TF_HIGH_ACCURACY_1","''","-","A","model","that",",","in","addition","to","being","available","within","Google","Cloud",",","can","also","be","exported","as","TensorFlow","or","Core","ML","model","and","used","on","a","mobile","or","edge","device","afterwards",".","Expected","to","have","a","higher","latency",",","but","should","also","have","a","higher","prediction","quality","than","other","mobile","models",".",":","param","base_model",":","Optional",".","Only","permitted","for","Image","Classification","models",".","If","it","is","specified",",","the","new","model","will","be","trained","based","on","the","`","base","`","model",".","Otherwise",",","the","new","model","will","be","trained","from","scratch",".","The","`","base","`","model","must","be","in","the","same","Project","and","Location","as","the","new","Model","to","train",",","and","have","the","same","model_type",".",":","param","labels",":","Optional",".","The","labels","with","user-defined","metadata","to","organize","TrainingPipelines",".","Label","keys","and","values","can","be","no","longer","than","64","characters","(","Unicode","codepoints",")",",","can","only","contain","lowercase","letters",",","numeric","characters",",","underscores","and","dashes",".","International","characters","are","allowed",".","See","https",":","\/\/goo.gl\/xmQnxf","for","more","information","and","examples","of","labels",".",":","param","training_encryption_spec_key_name",":","Optional",".","The","Cloud","KMS","resource","identifier","of","the","customer","managed","encryption","key","used","to","protect","the","training","pipeline",".","Has","the","form",":","``","projects\/my-project\/locations\/my-region\/keyRings\/my-kr\/cryptoKeys\/my-key","``",".","The","key","needs","to","be","in","the","same","region","as","where","the","compute","resource","is","created",".","If","set",",","this","TrainingPipeline","will","be","secured","by","this","key",".","Note",":","Model","trained","by","this","TrainingPipeline","is","also","secured","by","this","key","if","``","model_to_upload","``","is","not","set","separately",".",":","param","model_encryption_spec_key_name",":","Optional",".","The","Cloud","KMS","resource","identifier","of","the","customer","managed","encryption","key","used","to","protect","the","model",".","Has","the","form",":","``","projects\/my-project\/locations\/my-region\/keyRings\/my-kr\/cryptoKeys\/my-key","``",".","The","key","needs","to","be","in","the","same","region","as","where","the","compute","resource","is","created",".","If","set",",","the","trained","Model","will","be","secured","by","this","key",".",":","param","training_fraction_split",":","Optional",".","The","fraction","of","the","input","data","that","is","to","be","used","to","train","the","Model",".","This","is","ignored","if","Dataset","is","not","provided",".",":","param","validation_fraction_split",":","Optional",".","The","fraction","of","the","input","data","that","is","to","be","used","to","validate","the","Model",".","This","is","ignored","if","Dataset","is","not","provided",".",":","param","test_fraction_split",":","Optional",".","The","fraction","of","the","input","data","that","is","to","be","used","to","evaluate","the","Model",".","This","is","ignored","if","Dataset","is","not","provided",".",":","param","training_filter_split",":","Optional",".","A","filter","on","DataItems","of","the","Dataset",".","DataItems","that","match","this","filter","are","used","to","train","the","Model",".","A","filter","with","same","syntax","as","the","one","used","in","DatasetService.ListDataItems","may","be","used",".","If","a","single","DataItem","is","matched","by","more","than","one","of","the","FilterSplit","filters",",","then","it","is","assigned","to","the","first","set","that","applies","to","it","in","the","training",",","validation",",","test","order",".","This","is","ignored","if","Dataset","is","not","provided",".",":","param","validation_filter_split",":","Optional",".","A","filter","on","DataItems","of","the","Dataset",".","DataItems","that","match","this","filter","are","used","to","validate","the","Model",".","A","filter","with","same","syntax","as","the","one","used","in","DatasetService.ListDataItems","may","be","used",".","If","a","single","DataItem","is","matched","by","more","than","one","of","the","FilterSplit","filters",",","then","it","is","assigned","to","the","first","set","that","applies","to","it","in","the","training",",","validation",",","test","order",".","This","is","ignored","if","Dataset","is","not","provided",".",":","param","test_filter_split",":","Optional",".","A","filter","on","DataItems","of","the","Dataset",".","DataItems","that","match","this","filter","are","used","to","test","the","Model",".","A","filter","with","same","syntax","as","the","one","used","in","DatasetService.ListDataItems","may","be","used",".","If","a","single","DataItem","is","matched","by","more","than","one","of","the","FilterSplit","filters",",","then","it","is","assigned","to","the","first","set","that","applies","to","it","in","the","training",",","validation",",","test","order",".","This","is","ignored","if","Dataset","is","not","provided",".",":","param","budget_milli_node_hours",":","Optional",".","The","train","budget","of","creating","this","Model",",","expressed","in","milli","node","hours","i.e",".","1,000","value","in","this","field","means","1","node","hour",".","Defaults","by","`","prediction_type","`",":","`","classification","`","-","For","Cloud","models","the","budget","must","be",":","8,000","-","800,000","milli","node","hours","(","inclusive",")",".","The","default","value","is","192,000","which","represents","one","day","in","wall","time",",","assuming","8","nodes","are","used",".","`","object_detection","`","-","For","Cloud","models","the","budget","must","be",":","20,000","-","900,000","milli","node","hours","(","inclusive",")",".","The","default","value","is","216,000","which","represents","one","day","in","wall","time",",","assuming","9","nodes","are","used",".","The","training","cost","of","the","model","will","not","exceed","this","budget",".","The","final","cost","will","be","attempted","to","be","close","to","the","budget",",","though","may","end","up","being","(","even",")","noticeably","smaller","-","at","the","backend's","discretion",".","This","especially","may","happen","when","further","model","training","ceases","to","provide","any","improvements",".","If","the","budget","is","set","to","a","value","known","to","be","insufficient","to","train","a","Model","for","the","given","training","set",",","the","training","wo","n't","be","attempted","and","will","error",".",":","param","model_display_name",":","Optional",".","The","display","name","of","the","managed","Vertex","AI","Model",".","The","name","can","be","up","to","128","characters","long","and","can","be","consist","of","any","UTF-8","characters",".","If","not","provided","upon","creation",",","the","job","'s","display_name","is","used",".",":","param","model_labels",":","Optional",".","The","labels","with","user-defined","metadata","to","organize","your","Models",".","Label","keys","and","values","can","be","no","longer","than","64","characters","(","Unicode","codepoints",")",",","can","only","contain","lowercase","letters",",","numeric","characters",",","underscores","and","dashes",".","International","characters","are","allowed",".","See","https",":","\/\/goo.gl\/xmQnxf","for","more","information","and","examples","of","labels",".",":","param","disable_early_stopping",":","Required",".","If","true",",","the","entire","budget","is","used",".","This","disables","the","early","stopping","feature",".","By","default",",","the","early","stopping","feature","is","enabled",",","which","means","that","training","might","stop","before","the","entire","training","budget","has","been","used",",","if","further","training","does","no","longer","brings","significant","improvement","to","the","model",".",":","param","sync",":","Whether","to","execute","this","method","synchronously",".","If","False",",","this","method","will","be","executed","in","concurrent","Future","and","any","downstream","object","will","be","immediately","returned","and","synced","when","the","Future","has","completed","."]
code: def create_auto_ml_image_training_job(
      self,
      project_id: str,
      region: str,
      display_name: str,
      dataset: datasets.ImageDataset,
      prediction_type: str = "classification",
      multi_label: bool = False,
      model_type: str = "CLOUD",
      base_model: models.Model | None = None,
      labels: dict[str, str] | None = None,
      training_encryption_spec_key_name: str | None = None,
      model_encryption_spec_key_name: str | None = None,
      training_fraction_split: float | None = None,
      validation_fraction_split: float | None = None,
      test_fraction_split: float | None = None,
      training_filter_split: str | None = None,
      validation_filter_split: str | None = None,
      test_filter_split: str | None = None,
      budget_milli_node_hours: int | None = None,
      model_display_name: str | None = None,
      model_labels: dict[str, str] | None = None,
      disable_early_stopping: bool = False,
      sync: bool = True,
      parent_model: str | None = None,
      is_default_version: bool | None = None,
      model_version_aliases: list[str] | None = None,
      model_version_description: str | None = None,
  ) -> tuple[models.Model | None, str]:
      """
      Create an AutoML Image Training Job.
  
      :param project_id: Required. Project to run training in.
      :param region: Required. Location to run training in.
      :param display_name: Required. The user-defined name of this TrainingPipeline.
      :param dataset: Required. The dataset within the same Project from which data will be used to train
          the Model. The Dataset must use schema compatible with Model being trained, and what is
          compatible should be described in the used TrainingPipeline's [training_task_definition]
          [google.cloud.aiplatform.v1beta1.TrainingPipeline.training_task_definition]. For tabular
          Datasets, all their data is exported to training, to pick and choose from.
      :param prediction_type: The type of prediction the Model is to produce, one of:
          "classification" - Predict one out of multiple target values is picked for each row.
          "object_detection" - Predict a value based on its relation to other values. This type is
          available only to columns that contain semantically numeric values, i.e. integers or floating
          point number, even if stored as e.g. strings.
      :param parent_model: Optional. The resource name or model ID of an existing model.
          The new model uploaded by this job will be a version of `parent_model`.
          Only set this field when training a new version of an existing model.
      :param is_default_version: Optional. When set to True, the newly uploaded model version will
          automatically have alias "default" included. Subsequent uses of
          the model produced by this job without a version specified will
          use this "default" version.
          When set to False, the "default" alias will not be moved.
          Actions targeting the model version produced by this job will need
          to specifically reference this version by ID or alias.
          New model uploads, i.e. version 1, will always be "default" aliased.
      :param model_version_aliases: Optional. User provided version aliases so that the model version
          uploaded by this job can be referenced via alias instead of
          auto-generated version ID. A default version alias will be created
          for the first version of the model.
          The format is [a-z][a-zA-Z0-9-]{0,126}[a-z0-9]
      :param model_version_description: Optional. The description of the model version
          being uploaded by this job.
      :param multi_label: Required. Default is False. If false, a single-label (multi-class) Model will be
          trained (i.e. assuming that for each image just up to one annotation may be applicable). If true,
          a multi-label Model will be trained (i.e. assuming that for each image multiple annotations may
          be applicable).
          This is only applicable for the "classification" prediction_type and will be ignored otherwise.
      :param model_type: Required. One of the following:
          "CLOUD" - Default for Image Classification. A Model best tailored to be used within Google Cloud,
          and which cannot be exported.
          "CLOUD_HIGH_ACCURACY_1" - Default for Image Object Detection. A model best tailored to be used
          within Google Cloud, and which cannot be exported. Expected to have a higher latency, but should
          also have a higher prediction quality than other cloud models.
          "CLOUD_LOW_LATENCY_1" - A model best tailored to be used within Google Cloud, and which cannot be
          exported. Expected to have a low latency, but may have lower prediction quality than other cloud
          models.
          "MOBILE_TF_LOW_LATENCY_1" - A model that, in addition to being available within Google Cloud, can
          also be exported as TensorFlow or Core ML model and used on a mobile or edge device afterwards.
          Expected to have low latency, but may have lower prediction quality than other mobile models.
          "MOBILE_TF_VERSATILE_1" - A model that, in addition to being available within Google Cloud, can
          also be exported as TensorFlow or Core ML model and used on a mobile or edge device with
          afterwards.
          "MOBILE_TF_HIGH_ACCURACY_1" - A model that, in addition to being available within Google Cloud,
          can also be exported as TensorFlow or Core ML model and used on a mobile or edge device
          afterwards. Expected to have a higher latency, but should also have a higher prediction quality
          than other mobile models.
      :param base_model: Optional. Only permitted for Image Classification models. If it is specified, the
          new model will be trained based on the `base` model. Otherwise, the new model will be trained
          from scratch. The `base` model must be in the same Project and Location as the new Model to
          train, and have the same model_type.
      :param labels: Optional. The labels with user-defined metadata to organize TrainingPipelines. Label
          keys and values can be no longer than 64 characters (Unicode codepoints), can only contain
          lowercase letters, numeric characters, underscores and dashes. International characters are
          allowed. See https://goo.gl/xmQnxf for more information and examples of labels.
      :param training_encryption_spec_key_name: Optional. The Cloud KMS resource identifier of the customer
          managed encryption key used to protect the training pipeline. Has the form:
          ``projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key``. The key needs to be
          in the same region as where the compute resource is created. If set, this TrainingPipeline will
          be secured by this key.
          Note: Model trained by this TrainingPipeline is also secured by this key if ``model_to_upload``
          is not set separately.
      :param model_encryption_spec_key_name: Optional. The Cloud KMS resource identifier of the customer
          managed encryption key used to protect the model. Has the form:
          ``projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key``.
          The key needs to be in the same region as where the compute resource is created.
          If set, the trained Model will be secured by this key.
      :param training_fraction_split: Optional. The fraction of the input data that is to be used to train
          the Model. This is ignored if Dataset is not provided.
      :param validation_fraction_split: Optional. The fraction of the input data that is to be used to
          validate the Model. This is ignored if Dataset is not provided.
      :param test_fraction_split: Optional. The fraction of the input data that is to be used to evaluate
          the Model. This is ignored if Dataset is not provided.
      :param training_filter_split: Optional. A filter on DataItems of the Dataset. DataItems that match
          this filter are used to train the Model. A filter with same syntax as the one used in
          DatasetService.ListDataItems may be used. If a single DataItem is matched by more than one of the
          FilterSplit filters, then it is assigned to the first set that applies to it in the training,
          validation, test order. This is ignored if Dataset is not provided.
      :param validation_filter_split: Optional. A filter on DataItems of the Dataset. DataItems that match
          this filter are used to validate the Model. A filter with same syntax as the one used in
          DatasetService.ListDataItems may be used. If a single DataItem is matched by more than one of the
          FilterSplit filters, then it is assigned to the first set that applies to it in the training,
          validation, test order. This is ignored if Dataset is not provided.
      :param test_filter_split: Optional. A filter on DataItems of the Dataset. DataItems that match this
          filter are used to test the Model. A filter with same syntax as the one used in
          DatasetService.ListDataItems may be used. If a single DataItem is matched by more than one of the
          FilterSplit filters, then it is assigned to the first set that applies to it in the training,
          validation, test order. This is ignored if Dataset is not provided.
      :param budget_milli_node_hours: Optional. The train budget of creating this Model, expressed in milli
          node hours i.e. 1,000 value in this field means 1 node hour.
          Defaults by `prediction_type`:
          `classification` - For Cloud models the budget must be: 8,000 - 800,000 milli node hours
          (inclusive). The default value is 192,000 which represents one day in wall time, assuming 8 nodes
          are used.
          `object_detection` - For Cloud models the budget must be: 20,000 - 900,000 milli node hours
          (inclusive). The default value is 216,000 which represents one day in wall time, assuming 9 nodes
          are used.
          The training cost of the model will not exceed this budget. The final cost will be attempted to
          be close to the budget, though may end up being (even) noticeably smaller - at the backend's
          discretion. This especially may happen when further model training ceases to provide any
          improvements. If the budget is set to a value known to be insufficient to train a Model for the
          given training set, the training won't be attempted and will error.
      :param model_display_name: Optional. The display name of the managed Vertex AI Model. The name can be
          up to 128 characters long and can be consist of any UTF-8 characters. If not provided upon
          creation, the job's display_name is used.
      :param model_labels: Optional. The labels with user-defined metadata to organize your Models. Label
          keys and values can be no longer than 64 characters (Unicode codepoints), can only contain
          lowercase letters, numeric characters, underscores and dashes. International characters are
          allowed. See https://goo.gl/xmQnxf for more information and examples of labels.
      :param disable_early_stopping: Required. If true, the entire budget is used. This disables the early
          stopping feature. By default, the early stopping feature is enabled, which means that training
          might stop before the entire training budget has been used, if further training does no longer
          brings significant improvement to the model.
      :param sync: Whether to execute this method synchronously. If False, this method will be executed in
          concurrent Future and any downstream object will be immediately returned and synced when the
          Future has completed.
      """
      self._job = self.get_auto_ml_image_training_job(
          project=project_id,
          location=region,
          display_name=display_name,
          prediction_type=prediction_type,
          multi_label=multi_label,
          model_type=model_type,
          base_model=base_model,
          labels=labels,
          training_encryption_spec_key_name=training_encryption_spec_key_name,
          model_encryption_spec_key_name=model_encryption_spec_key_name,
      )
  
      if not self._job:
          raise AirflowException(
              "AutoMLImageTrainingJob was not created"
          )
  
      model = self._job.run(
          dataset=dataset,
          training_fraction_split=training_fraction_split,
          validation_fraction_split=validation_fraction_split,
          test_fraction_split=test_fraction_split,
          training_filter_split=training_filter_split,
          validation_filter_split=validation_filter_split,
          test_filter_split=test_filter_split,
          budget_milli_node_hours=budget_milli_node_hours,
          model_display_name=model_display_name,
          model_labels=model_labels,
          disable_early_stopping=disable_early_stopping,
          sync=sync,
          parent_model=parent_model,
          is_default_version=is_default_version,
          model_version_aliases=model_version_aliases,
          model_version_description=model_version_description,
      )
      training_id = self.extract_training_id(self._job.resource_name)
      if model:
          model.wait()
      else:
          self.log.warning(
              "Training did not produce a Managed Model returning None. AutoML Image Training "
              "Pipeline is not configured to upload a Model."
          )
      return model, training_id
  
imports: from __future__ import annotations
  import warnings
  from typing import TYPE_CHECKING, Sequence
  from google.api_core.client_options import ClientOptions
  from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault
  from google.cloud.aiplatform import AutoMLForecastingTrainingJob, AutoMLImageTrainingJob, AutoMLTabularTrainingJob, AutoMLTextTrainingJob, AutoMLVideoTrainingJob, datasets, models
  from google.cloud.aiplatform_v1 import JobServiceClient, PipelineServiceClient
  from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning
  from airflow.providers.google.common.hooks.base_google import GoogleBaseHook
label_desc: Use image node_id 15 for calling the AutoMLHook obj's underlying member method code with example usage: obj.create_auto_ml_image_training_job(project_id, region, display_name, dataset, prediction_type, multi_label, model_type, base_model, labels, training_encryption_spec_key_name, model_encryption_spec_key_name, training_fraction_split, validation_fraction_split, test_fraction_split, training_filter_split, validation_filter_split, test_filter_split, budget_milli_node_hours, model_display_name, model_labels, disable_early_stopping, sync, parent_model, is_default_version, model_version_aliases, model_version_description) and returns: model,  training_id