Skip to content

Commit

Permalink
Add a new metric type: CrossSliceMetricComputation and a new metric -…
Browse files Browse the repository at this point in the history
… Lift under addons/fairness in TFMA

PiperOrigin-RevId: 360256337
  • Loading branch information
jindalshivam09 authored and tfx-copybara committed Mar 1, 2021
1 parent dbd4d1e commit ac795f4
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions tfx/benchmarks/tfma_v2_benchmark_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
from tfx_bsl.tfxio import record_based_tfxio
from tfx_bsl.tfxio import test_util


# Maximum number of examples within a record batch.
_BATCH_SIZE = 1000

Expand Down Expand Up @@ -119,10 +118,12 @@ def report_benchmark(self, **kwargs):
kwargs["extras"] = {}
# Note that the GIT_COMMIT_ID is not included in the packages themselves:
# it must be injected by an external script.
kwargs["extras"]["commit_tfx"] = (getattr(tfx, "GIT_COMMIT_ID", None) or
getattr(tfx, "__version__", None))
kwargs["extras"]["commit_tfma"] = (getattr(tfma, "GIT_COMMIT_ID", None) or
getattr(tfma, "__version__", None))
kwargs["extras"]["commit_tfx"] = (
getattr(tfx, "GIT_COMMIT_ID", None) or
getattr(tfx, "__version__", None))
kwargs["extras"]["commit_tfma"] = (
getattr(tfma, "GIT_COMMIT_ID", None) or
getattr(tfma, "__version__", None))
# Stdout for use in tools which read the benchmark results from stdout.
print(self._get_name(), kwargs["wall_time"],
"({}x)".format(kwargs["iters"]))
Expand Down Expand Up @@ -387,7 +388,7 @@ def _runMetricsPlotsAndValidationsEvaluatorManualActuation(
inputs_per_accumulator = 1000
start = time.time()
for _ in range(_ITERS):
computations, _ = (
computations, _, _ = (
# pylint: disable=protected-access
metrics_plots_and_validations_evaluator
._filter_and_separate_computations(
Expand Down

0 comments on commit ac795f4

Please sign in to comment.