Fairness measurement, mitigation, monitoring, and pipeline tooling for ML workflows.
PyPI package: fairpipe · License: Apache-2.0 · Python 3.10+
| Fairlearn | AIF360 | fairpipe | |
|---|---|---|---|
| Metrics library | ✅ | ✅ | ✅ |
| Mitigation algorithms | ✅ | ✅ | ✅ |
| DataFrame I/O | ✅ | ✅ | ✅ |
| Parquet I/O | ❌ | ❌ | ✅ |
| Orchestrated end-to-end pipeline | ⚠️ Partial | ⚠️ Partial | ✅ |
| CI/CD integration | ❌ | ❌ | ✅ |
| GitHub Action | ❌ | ❌ | ✅ |
| Production monitoring | ❌ | ❌ | ✅ |
| REST API | ❌ | ❌ | ✅ |
Fairlearn and AIF360 provide individual pre/in/post-processing components; fairpipe provides a YAML-configured baseline→transform→validate workflow with CI/CD exit codes.
pip install fairpipe
Optional extras: pip install 'fairpipe[api]' · 'fairpipe[training]' · 'fairpipe[monitoring]' · 'fairpipe[adapters]'
(REST API, PyTorch training helpers, dashboards/drift, Fairlearn/Aequitas backends.) Full detail is in the documentation below—not duplicated here.
Start here (hosted): Documentation — SvrusIO.github.io/fAIr
Built from this repo’s Sphinx sources; includes getting started, user guide, API reference, integration, performance, and security links.
In-repo references (for browsing on GitHub or a checkout):
| Topic | Location |
|---|---|
| Getting started | docs/getting_started.md |
| User guide (long-form) | DOCS.md |
| API reference | docs/api.md |
| Playbook · fairpipe (as implemented) | docs/playbook-part-five-fairpipe.md |
| Integration guide | docs/integration_guide.md |
| Architecture / ADR | docs/ADR-001-architecture.md |
| Versioning | docs/VERSIONING.md |
| Release checklist (mirror / PyPI) | docs/RELEASE.md |
| Changelog | CHANGELOG.md |
CLI
fairpipe validate \
--csv data.csv \
--y-true y_true \
--y-pred y_pred \
--sensitive gender \
--with-ci
fairpipe run-pipeline --config config.yml --csv data.csv --output-dir artifacts/
Python
from fairpipe import load_data
from fairpipe.metrics import FairnessAnalyzer
df = load_data("data.csv")
analyzer = FairnessAnalyzer(min_group_size=30)
result = analyzer.demographic_parity_difference(
y_pred=df["y_pred"],
sensitive=df["gender"],
with_ci=True,
)
print(result.value, result.ci)
CLI commands, YAML configuration, workflow orchestration, training, monitoring, and the optional REST API are documented on the docs site and in docs/api.md.
Add fairness validation to every pull request with the companion GitHub Action:
# .github/workflows/fairness-check.yml
name: Fairness Check
on: [pull_request]
jobs:
fairness:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: SvrusIO/fairpipe-action@v1
with:
csv: data/predictions.csv
y-true: y_true
y-pred: y_pred
sensitive: gender
threshold: "0.05"
metric: "equalized_odds_difference"
fail-on-violation: "true"
Point csv at your predictions file. If equalized odds difference exceeds 0.05, the PR is blocked. A full fairness report is written to the Actions job summary — metric values, confidence intervals, group breakdowns — permanently attached to the commit.
git clone https://github.com/SvrusIO/fAIr.git
cd fAIr
pip install -e ".[dev]"
pytest -q
See CONTRIBUTING.md and SECURITY.md.
Real-world bias audits demonstrating fairpipe’s full pipeline — from measurement and detection through mitigation and CI/CD integration.
Reproduces ProPublica’s 2016 Machine Bias investigation on the COMPAS recidivism algorithm used in US courtrooms.
Demonstrates the type of bias audit now required under NYC Local Law 144 and the EU AI Act, framed around Mobley v. Workday — the 2025 class action alleging AI hiring tools discriminated against millions of applicants by age, race, and disability.
| Homepage / docs | SvrusIO.github.io/fAIr |
| Repository | github.com/SvrusIO/fAIr |
| Issues | github.com/SvrusIO/fAIr/issues |
Apache License 2.0 — see LICENSE.