Join the SIG TFX-Addons community and help make TFX even better!

Module: tfx.orchestration.kubeflow.v2.compiler_utils

Utility methods for Kubeflow V2 pipeline compilation.

Functions

build_input_parameter_spec(...): Converts a dict into Kubeflow pipeline input parameter section.

build_output_artifact_spec(...): Builds the Kubeflow pipeline output artifact spec from TFX channel spec.

build_runtime_parameter_spec(...): Converts RuntimeParameters to mapping from names to proto messages.

convert_from_tfx_properties(...): Converts (custom) properties to mapping to ValueOrRuntimeParameter pb.

get_artifact_schema(...): Gets the YAML schema string associated with the artifact type.

get_artifact_title(...): Gets the schema title from the artifact python class.

get_kubeflow_value(...): Converts TFX/MLMD values into Kubeflow pipeline Value proto message.

get_mlmd_value(...): Converts Kubeflow pipeline Value pb message to MLMD Value.

value_converter(...): Converts TFX/MLMD values into Kubeflow pipeline ValueOrRuntimeParameter.

TFX_TYPE_KEY 'tfx_type'
TITLE_TO_CLASS_PATH

{
 'tfx.Dataset': 'tfx.types.experimental.simple_artifacts.Dataset',
 'tfx.ExampleAnomalies': 'tfx.types.standard_artifacts.ExampleAnomalies',
 'tfx.ExampleStatistics': 'tfx.types.standard_artifacts.ExampleStatistics',
 'tfx.Examples': 'tfx.types.standard_artifacts.Examples',
 'tfx.File': 'tfx.types.experimental.simple_artifacts.File',
 'tfx.Float': 'tfx.types.standard_artifacts.Float',
 'tfx.HyperParameters': 'tfx.types.standard_artifacts.HyperParameters',
 'tfx.InferenceResult': 'tfx.types.standard_artifacts.InferenceResult',
 'tfx.InfraBlessing': 'tfx.types.standard_artifacts.InfraBlessing',
 'tfx.Integer': 'tfx.types.standard_artifacts.Integer',
 'tfx.Metrics': 'tfx.types.experimental.simple_artifacts.Metrics',
 'tfx.Model': 'tfx.types.standard_artifacts.Model',
 'tfx.ModelBlessing': 'tfx.types.standard_artifacts.ModelBlessing',
 'tfx.ModelEvaluation': 'tfx.types.standard_artifacts.ModelEvaluation',
 'tfx.ModelRun': 'tfx.types.standard_artifacts.ModelRun',
 'tfx.PushedModel': 'tfx.types.standard_artifacts.PushedModel',
 'tfx.Schema': 'tfx.types.standard_artifacts.Schema',
 'tfx.Statistics': 'tfx.types.experimental.simple_artifacts.Statistics',
 'tfx.String': 'tfx.types.standard_artifacts.String',
 'tfx.TransformCache': 'tfx.types.standard_artifacts.TransformCache',
 'tfx.TransformGraph': 'tfx.types.standard_artifacts.TransformGraph'
}

TYPE_NAME_KEY 'type_name'