Skip to content

feat: extract fairness metrics into src/fairness.py#6

Open
Reuben-Alex wants to merge 1 commit into
SantanderAI:mainfrom
Reuben-Alex:feat/fairness-module
Open

feat: extract fairness metrics into src/fairness.py#6
Reuben-Alex wants to merge 1 commit into
SantanderAI:mainfrom
Reuben-Alex:feat/fairness-module

Conversation

@Reuben-Alex

Copy link
Copy Markdown

Summary

  • Extract fairness_metrics and decision_disagreement from src/run_fair_decisions.py into a new tested module src/fairness.py
  • Refactor the fair-decisions experiment script to import from the new module with no behavior or output changes
  • Add tests/test_fairness.py with synthetic unit tests for DP/EO gaps and receiver disagreement

Type of change

  • feat — new feature

Test plan

  • pytest tests/ -v --cov=src (39 passed, 87% coverage)
  • ruff check . && black --check . && mypy src/
  • run_fair_decisions logic unchanged (same metrics keys, CSV schema, and print format)

Move fairness_metrics and decision_disagreement from the experiment
script into a tested library module to improve reusability and
reproducibility without changing experiment behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Reuben-Alex Reuben-Alex requested a review from a team as a code owner June 22, 2026 13:36
@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@Reuben-Alex

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant