class_docstr: Launcher is the main entrance of nodes in TFleX.
  
  It handles TFX internal details like artifact resolving, execution
  triggering and result publishing.
class_docstr_tok: ["Launcher","is","the","main","entrance","of","nodes","in","TFleX",".","It","handles","TFX","internal","details","like","artifact","resolving",",","execution","triggering","and","result","publishing","."]
docstr: Initializes a Launcher.
  
  Args:
    pipeline_node: The specification of the node that this launcher lauches.
    mlmd_connection: ML metadata connection.
    pipeline_info: The information of the pipeline that this node runs in.
    pipeline_runtime_spec: The runtime information of the pipeline that this
      node runs in.
    executor_spec: Specification for the executor of the node. This is
      expected for all components nodes. This will be used to determine the
      specific ExecutorOperator class to be used to execute and will be passed
      into ExecutorOperator.
    custom_driver_spec: Specification for custom driver. This is expected only
      for advanced use cases.
    platform_config: Platform config that will be used as auxiliary info of
      the node execution. This will be passed to ExecutorOperator along with
      the `executor_spec`.
    custom_executor_operators: a map of ExecutableSpec to its
      ExecutorOperation implementation.
    custom_driver_operators: a map of ExecutableSpec to its DriverOperator
      implementation.
  
  Raises:
    ValueError: when component and component_config are not launchable by the
    launcher.
code: def __init__(
      self,
      pipeline_node: pipeline_pb2.PipelineNode,
      mlmd_connection: metadata.Metadata,
      pipeline_info: pipeline_pb2.PipelineInfo,
      pipeline_runtime_spec: pipeline_pb2.PipelineRuntimeSpec,
      executor_spec: Optional[message.Message] = None,
      custom_driver_spec: Optional[message.Message] = None,
      platform_config: Optional[message.Message] = None,
      custom_executor_operators: Optional[
          Dict[Any, Type[ExecutorOperator]]
      ] = None,
      custom_driver_operators: Optional[
          Dict[Any, Type[DriverOperator]]
      ] = None,
  ):
      """Initializes a Launcher.
  
      Args:
        pipeline_node: The specification of the node that this launcher lauches.
        mlmd_connection: ML metadata connection.
        pipeline_info: The information of the pipeline that this node runs in.
        pipeline_runtime_spec: The runtime information of the pipeline that this
          node runs in.
        executor_spec: Specification for the executor of the node. This is
          expected for all components nodes. This will be used to determine the
          specific ExecutorOperator class to be used to execute and will be passed
          into ExecutorOperator.
        custom_driver_spec: Specification for custom driver. This is expected only
          for advanced use cases.
        platform_config: Platform config that will be used as auxiliary info of
          the node execution. This will be passed to ExecutorOperator along with
          the `executor_spec`.
        custom_executor_operators: a map of ExecutableSpec to its
          ExecutorOperation implementation.
        custom_driver_operators: a map of ExecutableSpec to its DriverOperator
          implementation.
  
      Raises:
        ValueError: when component and component_config are not launchable by the
        launcher.
      """
      self._pipeline_node = pipeline_node
      self._mlmd_connection = mlmd_connection
      self._pipeline_info = pipeline_info
      self._pipeline_runtime_spec = pipeline_runtime_spec
      self._executor_spec = executor_spec
      self._platform_config = platform_config
      self._executor_operators = {}
      self._executor_operators.update(DEFAULT_EXECUTOR_OPERATORS)
      self._executor_operators.update(custom_executor_operators or {})
      self._driver_operators = {}
      self._driver_operators.update(DEFAULT_DRIVER_OPERATORS)
      self._driver_operators.update(custom_driver_operators or {})
  
      self._executor_operator = None
      if executor_spec:
          self._executor_operator = self._executor_operators[
              type(executor_spec)
          ](executor_spec, platform_config)
      self._output_resolver = outputs_utils.OutputsResolver(
          pipeline_node=self._pipeline_node,
          pipeline_info=self._pipeline_info,
          pipeline_runtime_spec=self._pipeline_runtime_spec,
      )
  
      self._driver_operator = None
      if custom_driver_spec:
          self._driver_operator = self._driver_operators[
              type(custom_driver_spec)
          ](custom_driver_spec, self._mlmd_connection)
  
      system_node_handler_class = _SYSTEM_NODE_HANDLERS.get(
          self._pipeline_node.node_info.type.name
      )
      self._system_node_handler = None
      if system_node_handler_class:
          self._system_node_handler = system_node_handler_class()
  
      assert bool(self._executor_operator) or bool(
          self._system_node_handler
      ), "A node must be system node or have an executor."
  
imports: import sys
  from typing import Any, Dict, List, Mapping, Optional, Type, TypeVar
  from absl import logging
  import attr
  import grpc
  import portpicker
  from tfx import types
  from tfx.dsl.compiler import placeholder_utils
  from tfx.dsl.io import fileio
  from tfx.orchestration import data_types_utils
  from tfx.orchestration import metadata
  from tfx.orchestration.portable import base_driver_operator
  from tfx.orchestration.portable import base_executor_operator
  from tfx.orchestration.portable import beam_executor_operator
  from tfx.orchestration.portable import cache_utils
  from tfx.orchestration.portable import data_types
  from tfx.orchestration.portable import docker_executor_operator
  from tfx.orchestration.portable import execution_publish_utils
  from tfx.orchestration.portable import execution_watcher
  from tfx.orchestration.portable import importer_node_handler
  from tfx.orchestration.portable import inputs_utils
  from tfx.orchestration.portable import outputs_utils
  from tfx.orchestration.portable import python_driver_operator
  from tfx.orchestration.portable import python_executor_operator
  from tfx.orchestration.portable import resolver_node_handler
  from tfx.orchestration.portable.input_resolution import exceptions
  from tfx.orchestration.portable.mlmd import context_lib
  from tfx.orchestration.portable.mlmd import execution_lib
  from tfx.proto.orchestration import driver_output_pb2
  from tfx.proto.orchestration import executable_spec_pb2
  from tfx.proto.orchestration import execution_result_pb2
  from tfx.proto.orchestration import pipeline_pb2
  from tfx.utils import typing_utils
  from google.protobuf import message
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 1 to create a new Launcher object  with example: obj = Launcher(pipeline_node, mlmd_connection, pipeline_info, pipeline_runtime_spec, executor_spec, custom_driver_spec, platform_config, custom_executor_operators, custom_driver_operators)