tfx.orchestration.experimental.interactive.interactive_context.InteractiveContext

View source on GitHub

TFX interactive context for interactive TFX notebook development.

Used in the notebooks

Used in the tutorials

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.

Methods

export_to_pipeline

View source

Exports a notebook to a .py file as a runnable pipeline.

Args
notebook_filepath String path of the notebook file, e.g. '/path/to/notebook.ipynb'.
export_filepath String path for the exported pipeline python file, e.g. '/path/to/exported_pipeline.py'.
runner_type String indicating type of runner, e.g. 'beam', 'airflow'.

run

View source

Run a given TFX component in the interactive context.

Args
component Component instance to be run.
enable_cache whether caching logic should be enabled in the driver.
beam_pipeline_args Optional Beam pipeline args for beam jobs within executor. Executor will use beam DirectRunner as Default.

Returns
execution_result.ExecutionResult object.

show

View source

Show the given object in an IPython notebook display.