class_docstr: Hook for Google Cloud Vertex AI Custom Job APIs.
docstr: Run Job for training pipeline.
docstr_tok: ["Run","Job","for","training","pipeline","."]
code: def _run_job(
      self,
      job: (
          CustomTrainingJob
          | CustomContainerTrainingJob
          | CustomPythonPackageTrainingJob
      ),
      dataset: None
      | (
          datasets.ImageDataset
          | datasets.TabularDataset
          | datasets.TextDataset
          | datasets.VideoDataset
      ) = None,
      annotation_schema_uri: str | None = None,
      model_display_name: str | None = None,
      model_labels: dict[str, str] | None = None,
      base_output_dir: str | None = None,
      service_account: str | None = None,
      network: str | None = None,
      bigquery_destination: str | None = None,
      args: list[str | float | int] | None = None,
      environment_variables: dict[str, str] | None = None,
      replica_count: int = 1,
      machine_type: str = "n1-standard-4",
      accelerator_type: str = "ACCELERATOR_TYPE_UNSPECIFIED",
      accelerator_count: int = 0,
      boot_disk_type: str = "pd-ssd",
      boot_disk_size_gb: int = 100,
      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,
      predefined_split_column_name: str | None = None,
      timestamp_split_column_name: str | None = None,
      tensorboard: str | None = None,
      sync=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, str]:
      """Run Job for training pipeline."""
      model = job.run(
          dataset=dataset,
          annotation_schema_uri=annotation_schema_uri,
          model_display_name=model_display_name,
          model_labels=model_labels,
          base_output_dir=base_output_dir,
          service_account=service_account,
          network=network,
          bigquery_destination=bigquery_destination,
          args=args,
          environment_variables=environment_variables,
          replica_count=replica_count,
          machine_type=machine_type,
          accelerator_type=accelerator_type,
          accelerator_count=accelerator_count,
          boot_disk_type=boot_disk_type,
          boot_disk_size_gb=boot_disk_size_gb,
          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,
          predefined_split_column_name=predefined_split_column_name,
          timestamp_split_column_name=timestamp_split_column_name,
          tensorboard=tensorboard,
          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(job.resource_name)
      custom_job_id = self.extract_custom_job_id(
          job.gca_resource.training_task_metadata.get(
              "backingCustomJob"
          )
      )
      if model:
          model.wait()
      else:
          self.log.warning(
              "Training did not produce a Managed Model returning None. Training Pipeline is not "
              "configured to upload a Model. Create the Training Pipeline with "
              "model_serving_container_image_uri and model_display_name passed in. "
              "Ensure that your training script saves to model to os.environ['AIP_MODEL_DIR']."
          )
      return model, training_id, custom_job_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 CustomContainerTrainingJob, CustomPythonPackageTrainingJob, CustomTrainingJob, datasets, models
  from google.cloud.aiplatform_v1 import JobServiceClient, PipelineServiceClient
  from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning
  from airflow.providers.google.common.consts import CLIENT_INFO
  from airflow.providers.google.common.hooks.base_google import GoogleBaseHook
label_desc: Use image node_id 12 for calling the CustomJobHook obj's underlying member method code with example usage: obj._run_job(job, dataset, annotation_schema_uri, model_display_name, model_labels, base_output_dir, service_account, network, bigquery_destination, args, environment_variables, replica_count, machine_type, accelerator_type, accelerator_count, boot_disk_type, boot_disk_size_gb, training_fraction_split, validation_fraction_split, test_fraction_split, training_filter_split, validation_filter_split, test_filter_split, predefined_split_column_name, timestamp_split_column_name, tensorboard, sync, parent_model, is_default_version, model_version_aliases, model_version_description) and returns: model,  training_id,  custom_job_id