Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
add ConfidenceInterval field
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 386521367
  • Loading branch information
shuklak13 authored and ml-fairness-infra-github committed Jul 23, 2021
1 parent ee4fff7 commit 101bac0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 2 additions & 4 deletions model_card_toolkit/utils/graphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import base64
import io
import logging
from typing import Any, Sequence, Text, Tuple, Union, Optional
from typing import Sequence, Text, Tuple, Union, Optional

import attr
import matplotlib
Expand Down Expand Up @@ -96,7 +96,6 @@ def annotate_eval_result_plots(model_card: model_card_module.ModelCard,
eval_result: a `tfma.EvalResult`.
"""

# TODO(b/159058592): replace with `metrics = eval_result.get_metrics()`
metrics = set()
slices_keys = set()
for slicing_metric in eval_result.slicing_metrics:
Expand Down Expand Up @@ -182,8 +181,7 @@ def _generate_graph_from_feature_statistics(


def _generate_graph_from_slicing_metrics(
# TODO(b/159073391): replace Any with tfma.view.SlicedMetrics
slicing_metrics: Sequence[Any],
slicing_metrics: Sequence[tfma.view.SlicedMetrics],
metric: Text,
slices_key: Text = '',
output_name: Text = '',
Expand Down
1 change: 1 addition & 0 deletions model_card_toolkit/utils/json_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def update(json_dict: Optional[Dict[Text, Any]] = None) -> Dict[Text, Any]:
logging.info("JSON object already matches schema 0.0.2.")
return json_dict # pytype: disable=bad-return-type
except jsonschema.ValidationError:
logging.info("JSON object does match schema 0.0.2; updating.")
return _update_from_v1_to_v2(json_dict)


Expand Down

0 comments on commit 101bac0

Please sign in to comment.