class_docstr: Kubeflow V2 pipeline runner (currently for managed pipelines).
  
  Builds a pipeline job spec in json format based on TFX pipeline DSL object.
class_docstr_tok: ["Kubeflow","V2","pipeline","runner","(","currently","for","managed","pipelines",")",".","Builds","a","pipeline","job","spec","in","json","format","based","on","TFX","pipeline","DSL","object","."]
docstr: Constructs an KubeflowV2DagRunner for compiling pipelines.
  
  Args:
    config: An KubeflowV2DagRunnerConfig object to specify runtime
      configuration when running the pipeline in Kubeflow.
    output_dir: An optional output directory into which to output the pipeline
      definition files. Defaults to the current working directory.
    output_filename: An optional output file name for the pipeline definition
      file. The file output format will be a JSON-serialized PipelineJob pb
      message. Defaults to 'pipeline.json'.
docstr_tok: ["Constructs","an","KubeflowV2DagRunner","for","compiling","pipelines",".","Args",":","config",":","An","KubeflowV2DagRunnerConfig","object","to","specify","runtime","configuration","when","running","the","pipeline","in","Kubeflow",".","output_dir",":","An","optional","output","directory","into","which","to","output","the","pipeline","definition","files",".","Defaults","to","the","current","working","directory",".","output_filename",":","An","optional","output","file","name","for","the","pipeline","definition","file",".","The","file","output","format","will","be","a","JSON-serialized","PipelineJob","pb","message",".","Defaults","to","'pipeline.json","'","."]
code: def __init__(
      self,
      config: KubeflowV2DagRunnerConfig,
      output_dir: Optional[str] = None,
      output_filename: Optional[str] = None,
  ):
      """Constructs an KubeflowV2DagRunner for compiling pipelines.
  
      Args:
        config: An KubeflowV2DagRunnerConfig object to specify runtime
          configuration when running the pipeline in Kubeflow.
        output_dir: An optional output directory into which to output the pipeline
          definition files. Defaults to the current working directory.
        output_filename: An optional output file name for the pipeline definition
          file. The file output format will be a JSON-serialized PipelineJob pb
          message. Defaults to 'pipeline.json'.
      """
      if not isinstance(config, KubeflowV2DagRunnerConfig):
          raise TypeError(
              "config must be type of KubeflowV2DagRunnerConfig."
          )
      super().__init__()
      self._config = config
      self._output_dir = output_dir or os.getcwd()
      self._output_filename = output_filename or "pipeline.json"
      self._exit_handler = None
  
imports: import datetime
  import json
  import os
  from typing import Any, Dict, List, Optional, Union, MutableMapping
  from absl import logging
  from kfp.pipeline_spec import pipeline_spec_pb2
  from tfx import version
  from tfx.dsl.components.base import base_component
  from tfx.dsl.components.base import base_node
  from tfx.dsl.io import fileio
  from tfx.orchestration import pipeline
  from tfx.orchestration import tfx_runner
  from tfx.orchestration.config import pipeline_config
  from tfx.orchestration.kubeflow.v2 import pipeline_builder
  from tfx.utils import telemetry_utils
  from tfx.utils import version_utils
  from google.protobuf import json_format
label_desc: Use image node_id 1 to create a new KubeflowV2DagRunner object from inherited base classes: tfx_runner with example: obj = KubeflowV2DagRunner(config, output_dir, output_filename)