File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ def __init__(
95
95
label_values_or_threshold (Any): List of label values or threshold to indicate positive
96
96
outcome used for bias metrics.
97
97
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'.
99
99
facet_values_or_threshold (list): Optional list of values to form a sensitive group or
100
100
threshold for a numeric facet column that defines the lower bound of a sensitive
101
101
group. Defaults to considering each possible value as sensitive group and
Original file line number Diff line number Diff line change @@ -142,22 +142,24 @@ def test_invalid_data_bias_config():
142
142
BiasConfig (
143
143
label_values_or_threshold = label_values ,
144
144
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
+ }
146
150
],
147
151
group_name = group_name ,
148
152
)
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
151
155
)
152
156
with pytest .raises (ValueError ) as error :
153
157
BiasConfig (
154
158
label_values_or_threshold = label_values ,
155
159
facet_list = [{"value_or_threshold" : facet_threshold }],
156
- group_name = group_name
160
+ group_name = group_name ,
157
161
)
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 )
161
163
with pytest .raises (ValueError ) as error :
162
164
BiasConfig (
163
165
label_values_or_threshold = label_values ,
You can’t perform that action at this time.
0 commit comments