class_docstr: Helper methods for Kubeflow Handler.
class_docstr_tok: ["Helper","methods","for","Kubeflow","Handler","."]
docstr: Creates or updates a pipeline in Kubeflow.
  
  Args:
    update: set as true to update pipeline.
docstr_tok: ["Creates","or","updates","a","pipeline","in","Kubeflow",".","Args",":","update",":","set","as","true","to","update","pipeline","."]
code: def create_pipeline(self, update: bool = False) -> None:
      """Creates or updates a pipeline in Kubeflow.
  
      Args:
        update: set as true to update pipeline.
      """
  
      if self.flags_dict.get(labels.BUILD_IMAGE):
          build_image_fn = functools.partial(
              create_container_image,
              base_image=self.flags_dict.get(labels.BASE_IMAGE),
          )
      else:
          build_image_fn = None
          if os.path.exists("build.yaml"):
              click.echo(
                  "[Warning] TFX doesn't depend on skaffold anymore and you can "
                  "delete the auto-genrated build.yaml file. TFX will NOT build a "
                  "container even if build.yaml file exists. Use --build-image flag "
                  "to trigger an image build when creating or updating a pipeline.",
                  err=True,
              )
      patcher = kubeflow_dag_runner_patcher.KubeflowDagRunnerPatcher(
          call_real_run=True,
          use_temporary_output_file=True,
          build_image_fn=build_image_fn,
      )
      context = self.execute_dsl(patcher)
      pipeline_name = context[patcher.PIPELINE_NAME]
      pipeline_package_path = context[patcher.OUTPUT_FILE_PATH]
  
      self._save_pipeline(
          pipeline_name, pipeline_package_path, update=update
      )
  
      if context[patcher.USE_TEMPORARY_OUTPUT_FILE]:
          os.remove(pipeline_package_path)
  
      if update:
          click.echo(
              'Pipeline "{}" updated successfully.'.format(
                  pipeline_name
              )
          )
      else:
          click.echo(
              'Pipeline "{}" created successfully.'.format(
                  pipeline_name
              )
          )
  
imports: import functools
  import os
  import sys
  import time
  from typing import Any, Dict, Optional
  import click
  import kfp
  from tfx.orchestration.kubeflow import kubeflow_dag_runner
  from tfx.tools.cli import labels
  from tfx.tools.cli.container_builder import builder
  from tfx.tools.cli.handler import base_handler
  from tfx.tools.cli.handler import kubeflow_dag_runner_patcher
label_desc: Use image node_id 2 for calling the KubeflowHandler obj's underlying member method code with example usage: obj.create_pipeline(update) without return types