Skip to main content

Production-ready toolkit for fairness measurement, mitigation, and monitoring.

Project description

fairpipe

Fairness measurement, mitigation, monitoring, and pipeline tooling for ML workflows.
PyPI package: fairpipe · License: Apache-2.0 · Python 3.10+

PyPI version Python versions Coverage Launch in Binder


Install

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.


Documentation

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

Quick start

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.


Development

git clone https://github.com/SvrusIO/fAIr.git
cd fAIr
pip install -e ".[dev]"
pytest -q

See CONTRIBUTING.md and SECURITY.md.


Optional: GitHub Action for CI

Example composite action (metrics + optional threshold gate): SvrusIO/fairpipe-action — usage snippets also appear in the integration / CI sections of the hosted documentation.


Project links

Homepage / docs SvrusIO.github.io/fAIr
Repository github.com/SvrusIO/fAIr
Issues github.com/SvrusIO/fAIr/issues

License

Apache License 2.0 — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fairpipe-0.8.0.tar.gz (101.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fairpipe-0.8.0-py3-none-any.whl (128.0 kB view details)

Uploaded Python 3

File details

Details for the file fairpipe-0.8.0.tar.gz.

File metadata

  • Download URL: fairpipe-0.8.0.tar.gz
  • Upload date:
  • Size: 101.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for fairpipe-0.8.0.tar.gz
Algorithm Hash digest
SHA256 8eb0bca5a9176fdf69a9a1cee30fa773f8ba53b96808752557b4a72c858ad03a
MD5 87b7e551895a5d512c41804ac577f087
BLAKE2b-256 3220dbd9978983b9ebdea69f1098fdb921b306aec13b075a276f75a057d846b3

See more details on using hashes here.

File details

Details for the file fairpipe-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: fairpipe-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 128.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for fairpipe-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a51b69a0c7713ba94c959d9e2bba0fa08b489443cec04e1a58fa125010e3dbc5
MD5 0c6b41d9628e92e63f5b03d8384bc5f4
BLAKE2b-256 3c27cd19e01747a39a629fb7807cef98c94283e2efe10096b5386204c242b508

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page