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

Commit 101bac0

Browse files
shuklak13ml-fairness-infra-github
authored andcommitted
add ConfidenceInterval field
PiperOrigin-RevId: 386521367
1 parent ee4fff7 commit 101bac0

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Diff for: model_card_toolkit/utils/graphics.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import base64
1818
import io
1919
import logging
20-
from typing import Any, Sequence, Text, Tuple, Union, Optional
20+
from typing import Sequence, Text, Tuple, Union, Optional
2121

2222
import attr
2323
import matplotlib
@@ -96,7 +96,6 @@ def annotate_eval_result_plots(model_card: model_card_module.ModelCard,
9696
eval_result: a `tfma.EvalResult`.
9797
"""
9898

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

183182

184183
def _generate_graph_from_slicing_metrics(
185-
# TODO(b/159073391): replace Any with tfma.view.SlicedMetrics
186-
slicing_metrics: Sequence[Any],
184+
slicing_metrics: Sequence[tfma.view.SlicedMetrics],
187185
metric: Text,
188186
slices_key: Text = '',
189187
output_name: Text = '',

Diff for: model_card_toolkit/utils/json_util.py

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def update(json_dict: Optional[Dict[Text, Any]] = None) -> Dict[Text, Any]:
4646
logging.info("JSON object already matches schema 0.0.2.")
4747
return json_dict # pytype: disable=bad-return-type
4848
except jsonschema.ValidationError:
49+
logging.info("JSON object does match schema 0.0.2; updating.")
4950
return _update_from_v1_to_v2(json_dict)
5051

5152

0 commit comments

Comments
 (0)