Skip to content

Commit 9028cb2

Browse files
committed
fix: minor
1 parent beefb2f commit 9028cb2

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

src/sagemaker/clarify.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def __init__(
9595
label_values_or_threshold (Any): List of label values or threshold to indicate positive
9696
outcome used for bias metrics.
9797
facet_name (str): Sensitive attribute in the input data for which we like to compare
98-
metrics.
98+
metrics. Will be ignored if pass 'facet_list'.
9999
facet_values_or_threshold (list): Optional list of values to form a sensitive group or
100100
threshold for a numeric facet column that defines the lower bound of a sensitive
101101
group. Defaults to considering each possible value as sensitive group and

tests/unit/test_clarify.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -142,22 +142,24 @@ def test_invalid_data_bias_config():
142142
BiasConfig(
143143
label_values_or_threshold=label_values,
144144
facet_list=[
145-
{"random_field": "random_string", "name_or_index": facet_name, "value_or_threshold": facet_threshold}
145+
{
146+
"random_field": "random_string",
147+
"name_or_index": facet_name,
148+
"value_or_threshold": facet_threshold,
149+
}
146150
],
147151
group_name=group_name,
148152
)
149-
assert (
150-
"Please only include 'name_or_index' or 'value_or_threshold' in dictionary keys." in str(error.value)
153+
assert "Please only include 'name_or_index' or 'value_or_threshold' in dictionary keys." in str(
154+
error.value
151155
)
152156
with pytest.raises(ValueError) as error:
153157
BiasConfig(
154158
label_values_or_threshold=label_values,
155159
facet_list=[{"value_or_threshold": facet_threshold}],
156-
group_name=group_name
160+
group_name=group_name,
157161
)
158-
assert (
159-
"Please include valid format of 'name_or_index' in dictionary" in str(error.value)
160-
)
162+
assert "Please include valid format of 'name_or_index' in dictionary" in str(error.value)
161163
with pytest.raises(ValueError) as error:
162164
BiasConfig(
163165
label_values_or_threshold=label_values,

0 commit comments

Comments
 (0)