Modifies the given exporter to remove metrics before export.
tfma.exporter.adapt_to_remove_metrics(
exporter: tf_estimator.Exporter,
metrics_to_remove: Union[List[str], Callable[[str], bool]]
) -> tf_estimator.Exporter
This is useful for when you use py_func, streaming metrics, or other metrics
incompatible with TFMA in your trainer. To keep these metrics in your trainer
(so they still show up in Tensorboard) and still use TFMA, you can call
adapt_to_remove_metrics on your TFMA exporter.
Args |
exporter
|
Exporter to modify. Will be mutated in place.
|
metrics_to_remove
|
Which metrics to remove. Either a list of names, or a
callable that returns true for names that should be removed.
|
Returns |
The mutated exporter, which will be modified in place. We also return it
so that this can be used in an expression.
|