Module core.components.bulk_inferrer.utils

Functions

convert_to_dict(prediction_log: tensorflow_serving.apis.prediction_log_pb2.PredictionLog, output_example_spec: Union[tfx.proto.bulk_inferrer_pb2.OutputExampleSpec, Any]) ‑> tensorflow.core.example.example_pb2.Example : Converts given prediction_log to a tf.train.Example.

Args:
  prediction_log: The input prediction log.
  output_example_spec: The spec for how to map prediction results to
  columns in example.

Returns:
  A `tf.train.Example` converted from the given prediction_log.
Raises:
  ValueError: If the inference type or signature name in spec does not
  match that in prediction_log.

to_dict(example: tensorflow.core.example.example_pb2.Example) ‑> Dict[str, Any] : Add given features to example.