def __init__(self, output_dir: Optional[Text]=None, output_filename: Optional[Text]=None, config: Optional[KubeflowDagRunnerConfig]=None, pod_labels_to_attach: Optional[Dict[(Text, Text)]]=None):
    'Initializes KubeflowDagRunner for compiling a Kubeflow Pipeline.\n\n    Args:\n      output_dir: An optional output directory into which to output the pipeline\n        definition files. Defaults to the current working directory.\n      output_filename: An optional output file name for the pipeline definition\n        file. Defaults to pipeline_name.tar.gz when compiling a TFX pipeline.\n        Currently supports .tar.gz, .tgz, .zip, .yaml, .yml formats. See\n        https://github.com/kubeflow/pipelines/blob/181de66cf9fa87bcd0fe9291926790c400140783/sdk/python/kfp/compiler/compiler.py#L851\n          for format restriction.\n      config: An optional KubeflowDagRunnerConfig object to specify runtime\n        configuration when running the pipeline under Kubeflow.\n      pod_labels_to_attach: Optional set of pod labels to attach to GKE pod\n        spinned up for this pipeline. Default to the 3 labels:\n        1. add-pod-env: true,\n        2. pipeline SDK type,\n        3. pipeline unique ID,\n        where 2 and 3 are instrumentation of usage tracking.\n    '
    if (config and (not isinstance(config, KubeflowDagRunnerConfig))):
        raise TypeError('config must be type of KubeflowDagRunnerConfig.')
    super(KubeflowDagRunner, self).__init__((config or KubeflowDagRunnerConfig()))
    self._config = cast(KubeflowDagRunnerConfig, self._config)
    self._output_dir = (output_dir or os.getcwd())
    self._output_filename = output_filename
    self._compiler = compiler.Compiler()
    self._tfx_compiler = tfx_compiler.Compiler()
    self._params = []
    self._deduped_parameter_names = set()
    if (pod_labels_to_attach is None):
        self._pod_labels_to_attach = get_default_pod_labels()
    else:
        self._pod_labels_to_attach = pod_labels_to_attach
Initializes KubeflowDagRunner for compiling a Kubeflow Pipeline.

Args:
  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. Defaults to pipeline_name.tar.gz when compiling a TFX pipeline.
    Currently supports .tar.gz, .tgz, .zip, .yaml, .yml formats. See
    https://github.com/kubeflow/pipelines/blob/181de66cf9fa87bcd0fe9291926790c400140783/sdk/python/kfp/compiler/compiler.py#L851
      for format restriction.
  config: An optional KubeflowDagRunnerConfig object to specify runtime
    configuration when running the pipeline under Kubeflow.
  pod_labels_to_attach: Optional set of pod labels to attach to GKE pod
    spinned up for this pipeline. Default to the 3 labels:
    1. add-pod-env: true,
    2. pipeline SDK type,
    3. pipeline unique ID,
    where 2 and 3 are instrumentation of usage tracking.
def __init__(self, output_dir: Optional[Text]=None, output_filename: Optional[Text]=None, config: Optional[KubeflowDagRunnerConfig]=None, pod_labels_to_attach: Optional[Dict[(Text, Text)]]=None):
    'Initializes KubeflowDagRunner for compiling a Kubeflow Pipeline.\n\n    Args:\n      output_dir: An optional output directory into which to output the pipeline\n        definition files. Defaults to the current working directory.\n      output_filename: An optional output file name for the pipeline definition\n        file. Defaults to pipeline_name.tar.gz when compiling a TFX pipeline.\n        Currently supports .tar.gz, .tgz, .zip, .yaml, .yml formats. See\n        https://github.com/kubeflow/pipelines/blob/181de66cf9fa87bcd0fe9291926790c400140783/sdk/python/kfp/compiler/compiler.py#L851\n          for format restriction.\n      config: An optional KubeflowDagRunnerConfig object to specify runtime\n        configuration when running the pipeline under Kubeflow.\n      pod_labels_to_attach: Optional set of pod labels to attach to GKE pod\n        spinned up for this pipeline. Default to the 3 labels:\n        1. add-pod-env: true,\n        2. pipeline SDK type,\n        3. pipeline unique ID,\n        where 2 and 3 are instrumentation of usage tracking.\n    '
    if (config and (not isinstance(config, KubeflowDagRunnerConfig))):
        raise TypeError('config must be type of KubeflowDagRunnerConfig.')
    super(KubeflowDagRunner, self).__init__((config or KubeflowDagRunnerConfig()))
    self._config = cast(KubeflowDagRunnerConfig, self._config)
    self._output_dir = (output_dir or os.getcwd())
    self._output_filename = output_filename
    self._compiler = compiler.Compiler()
    self._tfx_compiler = tfx_compiler.Compiler()
    self._params = []
    self._deduped_parameter_names = set()
    if (pod_labels_to_attach is None):
        self._pod_labels_to_attach = get_default_pod_labels()
    else:
        self._pod_labels_to_attach = pod_labels_to_attach