Converts the given slice metrics into serialized proto MetricsForSlice.
tfma.writers.convert_slice_metrics_to_proto(
metrics: Tuple[slicer.SliceKeyOrCrossSliceKeyType, metric_types.MetricsDict],
add_metrics_callbacks: Optional[List[types.AddMetricsCallbackType]]
) -> tfma.MetricsForSlice
Args |
metrics
|
The slice metrics.
|
add_metrics_callbacks
|
A list of metric callbacks. This should be the same
list as the one passed to tfma.Evaluate().
|
Returns |
The MetricsForSlice proto.
|
Raises |
TypeError
|
If the type of the feature value in slice key cannot be
recognized.
|