class_docstr: Local TFX DAG runner.
class_docstr_tok: ["Local","TFX","DAG","runner","."]
docstr: Runs given logical pipeline locally.
  
  Args:
    tfx_pipeline: Logical pipeline containing pipeline args and components.
docstr_tok: ["Runs","given","logical","pipeline","locally",".","Args",":","tfx_pipeline",":","Logical","pipeline","containing","pipeline","args","and","components","."]
code: def run(self, tfx_pipeline: pipeline.Pipeline) -> None:
      """Runs given logical pipeline locally.
  
      Args:
        tfx_pipeline: Logical pipeline containing pipeline args and components.
      """
      tfx_pipeline.pipeline_info.run_id = (
          datetime.datetime.now().isoformat()
      )
  
      with telemetry_utils.scoped_labels(
          {telemetry_utils.LABEL_TFX_RUNNER: "local"}
      ):
          # Run each component. Note that the pipeline.components list is in
          # topological order.
          #
          # TODO(b/171319478): After IR-based execution is used, used multi-threaded
          # execution so that independent components can be run in parallel.
          for component in tfx_pipeline.components:
              # TODO(b/187122662): Pass through pip dependencies as a first-class
              # component flag.
              if isinstance(component, base_component.BaseComponent):
                  component._resolve_pip_dependencies(  # pylint: disable=protected-access
                      tfx_pipeline.pipeline_info.pipeline_root
                  )
              (
                  component_launcher_class,
                  component_config,
              ) = config_utils.find_component_launch_info(
                  self._config, component
              )
              driver_args = data_types.DriverArgs(
                  enable_cache=tfx_pipeline.enable_cache
              )
              metadata_connection = metadata.Metadata(
                  tfx_pipeline.metadata_connection_config
              )
              node_launcher = component_launcher_class.create(
                  component=component,
                  pipeline_info=tfx_pipeline.pipeline_info,
                  driver_args=driver_args,
                  metadata_connection=metadata_connection,
                  beam_pipeline_args=tfx_pipeline.beam_pipeline_args,
                  additional_pipeline_args=tfx_pipeline.additional_pipeline_args,
                  component_config=component_config,
              )
              logging.info("Component %s is running.", component.id)
              node_launcher.launch()
              logging.info("Component %s is finished.", component.id)
  
file_path: tfx/tfx/orchestration/local/legacy/local_dag_runner.py
imports: import datetime
  from typing import Optional
  from absl import logging
  from tfx.dsl.components.base import base_component
  from tfx.orchestration import data_types
  from tfx.orchestration import metadata
  from tfx.orchestration import pipeline
  from tfx.orchestration import tfx_runner
  from tfx.orchestration.config import config_utils
  from tfx.orchestration.config import pipeline_config
  from tfx.orchestration.launcher import docker_component_launcher
  from tfx.orchestration.launcher import in_process_component_launcher
  from tfx.utils import telemetry_utils
label_desc: Use image node_id 2 for calling the LocalDagRunner obj's underlying member method code with example usage: obj.run(tfx_pipeline) without return types