Skip to content

Commit 59b6b8c

Browse files
committed
linted
1 parent f97b7bf commit 59b6b8c

7 files changed

Lines changed: 5 additions & 13 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
## Who is this for?
1212

1313
- **ML engineers and data scientists** building or evaluating models in Python.
14-
- **Bias auditors and compliance teams** needing standardized, traceable fairness reports.
1514
- **Researchers** studying AI bias across data modalities (tabular, vision, LLMs, etc).
15+
- **Bias auditors and compliance teams** needing standardized, traceable fairness reports, and system comparison across different datasets, parameters, and over time.
1616
- **Policymakers and analysts** who want reproducible evidence for decision‑making. Consider using the low‑code MAI‑BIAS toolkit for a higher level perspective.
1717

1818
## About

fairbench/bench/text/datasets.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,13 @@ def simplequestions(
3535
n=1000,
3636
overwrite=False,
3737
):
38-
warnings.warn(
39-
"""
38+
warnings.warn("""
4039
DISCLAIMER: You are using FairBench for LLM assessment.
4140
Prompts and prompt templates may reflect biases, for example by being deliberately engineered to attempt to induce
4241
more biased answers than normal. This is done so that discrepancies between groups, or between biased and unbiased
4342
behavior, can be uncovered by qualitative and quantitative assessment. This warning is shown to promote responsible
4443
usage.
45-
"""
46-
)
44+
""")
4745
if os.path.exists(cache) and not overwrite:
4846
with open(cache, "r") as file:
4947
dataset = json.load(file)

fairbench/v1/reports/accumulate.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from fairbench.v1.core import comparator, parallel_primitive, astensor, merge
22
import eagerpy as ep
33

4-
54
"""
65
This module provides helper methods to concatenate tensors stored within Forks of tensor or Forks of dicts of tensors
76
and use the final output in one report at the end.

fairbench/v2/export/formats/html_bars.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,17 +233,15 @@ def _render_individual_tables(self):
233233
header_cells = "".join(
234234
f"<th style='width:{self.cell_width_px}px;'>{x}</th>" for x in x_labels
235235
)
236-
html_sections.append(
237-
f"""
236+
html_sections.append(f"""
238237
<div style="margin:20px;">
239238
<h2 style="font-family:sans-serif;">{title}</h2>
240239
<table style="border-collapse:collapse;font-family:sans-serif;">
241240
<tr><th></th>{header_cells}</tr>
242241
{''.join(rows_html)}
243242
</table>
244243
</div>
245-
"""
246-
)
244+
""")
247245

248246
self.bar_contents = [f"<html><body>{''.join(html_sections)}</body></html>"]
249247

fairbench/v2/reports/adhoc.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from fairbench.v1 import core as deprecated
55
import numpy as np
66

7-
87
all_measures = [
98
blocks.measures.acc,
109
blocks.measures.pr,

playground/objworks/atpercentages.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import fairbench as fb1
33
import numpy as np
44

5-
65
comparison = fb.Progress("settings")
76
for test_size in np.arange(0.1, 1, 0.1):
87
x, y, yhat = fb1.bench.tabular.bank(test_size=test_size)

playground/v1/basics/basics.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import fairbench.v1 as fb
22

3-
43
test, y, scores = fb.bench.tabular.adult(predict="probabilities")
54
yhat = scores > 0.5
65
sensitive = fb.Fork(fb.categories @ test[8], fb.categories @ test[9])

0 commit comments

Comments
 (0)