Skip to content

Feature: support --proxy-hints-with on faircode compare, not just profile #737

Description

@yakew7

Where: faircode/cli.py (compare subparser), faircode/SPEC.md section 3.

Current gap: profile's subparser has both --proxy-hints and --proxy-hints-with PATH=COLUMN, letting a user test a chi-squared proxy association against a protected column that was already dropped from the dataset. compare's subparser only registers --proxy-hints - there is no --proxy-hints-with argument at all in the compare parser block. SPEC.md states this explicitly: "Currently profile-only; compare's --proxy-hints does not accept --proxy-hints-with." proxy.py's parse_held_out_specs is already generic (takes any df), so the plumbing is already shared/reusable - only the CLI wiring for compare and calling proxy_hints(df_a/df_b, ..., held_out=...) twice is missing.

Repro:

$ grep -n "proxy-hints-with" faircode/cli.py
156:    p.add_argument("--proxy-hints-with", ...)   # only in the `profile` subparser block
$ grep -n "Currently .profile.-only" faircode/SPEC.md
134:Currently `profile`-only; `compare`'s `--proxy-hints` does not accept `--proxy-hints-with`.

Suggested approach: add --proxy-hints-with (repeatable, action="append") to the compare subparser, requiring the same PATH=COLUMN rows to align 1:1 with both csv_a and csv_b (or accept two separate flags, --proxy-hints-with-a/--proxy-hints-with-b, since A and B may have different row counts) and call proxy_hints(df_a, ..., held_out=held_out_a) / proxy_hints(df_b, ..., held_out=held_out_b) accordingly, reusing _build_held_out from cli.py.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions