class_docstr: TFX interactive context for interactive TFX notebook development.
  
  Note: these APIs are **experimental** and major changes to interface and
  functionality are expected.
class_docstr_tok: ["TFX","interactive","context","for","interactive","TFX","notebook","development",".","Note",":","these","APIs","are","*","*","experimental","*","*","and","major","changes","to","interface","and","functionality","are","expected","."]
docstr: Initialize an InteractiveContext.
  
  Args:
    pipeline_name: Optional name of the pipeline for ML Metadata tracking
      purposes. If not specified, a name will be generated for you.
    pipeline_root: Optional path to the root of the pipeline's outputs. If not
      specified, an ephemeral temporary directory will be created and used.
    metadata_connection_config: Optional metadata_store_pb2.ConnectionConfig
      instance used to configure connection to a ML Metadata connection. If
      not specified, an ephemeral SQLite MLMD connection contained in the
      pipeline_root directory with file name "metadata.sqlite" will be used.
    beam_pipeline_args: Optional Beam pipeline args for beam jobs within
      executor. Executor will use beam DirectRunner as Default.
docstr_tok: ["Initialize","an","InteractiveContext",".","Args",":","pipeline_name",":","Optional","name","of","the","pipeline","for","ML","Metadata","tracking","purposes",".","If","not","specified",",","a","name","will","be","generated","for","you",".","pipeline_root",":","Optional","path","to","the","root","of","the","pipeline","'s","outputs",".","If","not","specified",",","an","ephemeral","temporary","directory","will","be","created","and","used",".","metadata_connection_config",":","Optional","metadata_store_pb2.ConnectionConfig","instance","used","to","configure","connection","to","a","ML","Metadata","connection",".","If","not","specified",",","an","ephemeral","SQLite","MLMD","connection","contained","in","the","pipeline_root","directory","with","file","name","``","metadata.sqlite","''","will","be","used",".","beam_pipeline_args",":","Optional","Beam","pipeline","args","for","beam","jobs","within","executor",".","Executor","will","use","beam","DirectRunner","as","Default","."]
code: def __init__(
      self,
      pipeline_name: Optional[str] = None,
      pipeline_root: Optional[str] = None,
      metadata_connection_config: Optional[
          metadata_store_pb2.ConnectionConfig
      ] = None,
      beam_pipeline_args: Optional[List[str]] = None,
  ):
      """Initialize an InteractiveContext.
  
      Args:
        pipeline_name: Optional name of the pipeline for ML Metadata tracking
          purposes. If not specified, a name will be generated for you.
        pipeline_root: Optional path to the root of the pipeline's outputs. If not
          specified, an ephemeral temporary directory will be created and used.
        metadata_connection_config: Optional metadata_store_pb2.ConnectionConfig
          instance used to configure connection to a ML Metadata connection. If
          not specified, an ephemeral SQLite MLMD connection contained in the
          pipeline_root directory with file name "metadata.sqlite" will be used.
        beam_pipeline_args: Optional Beam pipeline args for beam jobs within
          executor. Executor will use beam DirectRunner as Default.
      """
  
      if not pipeline_name:
          pipeline_name = (
              "interactive-%s"
              % datetime.datetime.now().isoformat().replace(":", "_")
          )
      if not pipeline_root:
          pipeline_root = tempfile.mkdtemp(
              prefix="tfx-%s-" % pipeline_name
          )
          absl.logging.warning(
              "InteractiveContext pipeline_root argument not provided: using "
              "temporary directory %s as root for pipeline outputs.",
              pipeline_root,
          )
      if not metadata_connection_config:
          # TODO(ccy): consider reconciling similar logic here with other instances
          # in tfx/orchestration/...
          metadata_sqlite_path = os.path.join(
              pipeline_root, self._DEFAULT_SQLITE_FILENAME
          )
          metadata_connection_config = (
              metadata.sqlite_metadata_connection_config(
                  metadata_sqlite_path
              )
          )
          absl.logging.warning(
              "InteractiveContext metadata_connection_config not provided: using "
              "SQLite ML Metadata database at %s.",
              metadata_sqlite_path,
          )
      self.pipeline_name = pipeline_name
      self.pipeline_root = pipeline_root
      self.metadata_connection_config = metadata_connection_config
      self.beam_pipeline_args = beam_pipeline_args or []
  
      # Register IPython formatters.
      notebook_formatters.register_formatters()
  
      # Register artifact visualizations.
      standard_visualizations.register_standard_visualizations()
  
imports: import datetime
  import html
  import os
  import tempfile
  from typing import List, Optional
  import absl
  import jinja2
  import nbformat
  from tfx import types
  from tfx.dsl.components.base import base_component
  from tfx.dsl.components.base import base_node
  from tfx.orchestration import data_types
  from tfx.orchestration import metadata
  from tfx.orchestration.experimental.interactive import execution_result
  from tfx.orchestration.experimental.interactive import notebook_formatters
  from tfx.orchestration.experimental.interactive import notebook_utils
  from tfx.orchestration.experimental.interactive import standard_visualizations
  from tfx.orchestration.experimental.interactive import visualizations
  from tfx.orchestration.launcher import in_process_component_launcher
  from tfx.utils import telemetry_utils
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 1 to create a new InteractiveContext object  with example: obj = InteractiveContext(pipeline_name, pipeline_root, metadata_connection_config, beam_pipeline_args)