tfx.orchestration.kubeflow.v2.parameter_utils.ParameterContext

A context that helps collecting runtime parameters during compilation.

This context object should be only used by PipelineBuilder during compilation, to collect all the RuntimeParameter encountered. For example:

tasks = []
with ParameterContext() as pc:
  for component in components:
    tasks.append(step_builder.StepBuilder(...).build())
    ...

Then later on, pc.parameters stores the list of all RuntimeParameters occurred when building each steps, which can be used to populate pipeline_spec.runtime_parameters field.

Methods

__enter__

View source

__exit__

View source