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


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.7.4.tar.gz (98.0 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.7.4-py3-none-any.whl (124.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for fairpipe-0.7.4.tar.gz
Algorithm Hash digest
SHA256 7993cc3c831844854085b962e5649abc4a35291626db662ba44af94f0864fe0b
MD5 1085bfd35f94ba6e58b34dde6cab385e
BLAKE2b-256 15c868a86dda690c60be031f32716e8bc8c3a2d8fe02ba4b9c3b3f4dabbdc519

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fairpipe-0.7.4-py3-none-any.whl
  • Upload date:
  • Size: 124.5 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.7.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2bd4e2269dcc151fc50d8a7f7cb921bef406dfc3f3b21ea6b6a3fd6c9311d544
MD5 6ab49f5ccec13b4cfbd0777d3bd09b3c
BLAKE2b-256 8591355d4e34d896091999b444c01f5d0b0ed608cb99ea0c320850992e70846c

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