class_docstr: Implementation of Kubernetes Task Scheduler.
class_docstr_tok: ["Implementation","of","Kubernetes","Task","Scheduler","."]
code: def __init__(
      self,
      mlmd_handle: metadata.Metadata,
      pipeline: pipeline_pb2.Pipeline,
      task: task_lib.ExecNodeTask,
  ):
      super().__init__(mlmd_handle, pipeline, task)
      self._cancel = threading.Event()
      if task.cancel_type:
          self._cancel.set()
      # TODO(b/240237394): pass tfx_image, job_prefix, container_name as
      # arguments.
      self._runner = kubernetes_job_runner.KubernetesJobRunner(
          tfx_image="",  # You need to set tfx_image with your image.
          job_prefix="sample-job",
          container_name="centralized-orchestrator",
      )
  
file_path: tfx/tfx/orchestration/experimental/centralized_kubernetes_orchestrator/kubernetes_task_scheduler.py
imports: import threading
  from tfx.orchestration import data_types_utils
  from tfx.orchestration import metadata
  from tfx.orchestration.experimental.centralized_kubernetes_orchestrator import kubernetes_job_runner
  from tfx.orchestration.experimental.core import task
  from tfx.orchestration.experimental.core import task_scheduler
  from tfx.orchestration.portable import data_types
  from tfx.proto.orchestration import executable_spec_pb2
  from tfx.proto.orchestration import execution_invocation_pb2
  from tfx.proto.orchestration import pipeline_pb2
  from tfx.utils import status
label_desc: Use image node_id 1 to create a new KubernetesTaskScheduler object from inherited base classes: task_scheduler.TaskScheduler with example: obj = KubernetesTaskScheduler(mlmd_handle, pipeline, task)