feat(measurement): add RAT-Bench reidentification W&B metrics#225
feat(measurement): add RAT-Bench reidentification W&B metrics#225lipikaramaswamy wants to merge 3 commits into
Conversation
Signed-off-by: Lipika Ramaswamy <lipika.ramaswamy@gmail.com>
8777f3f to
97f5b8b
Compare
Greptile SummaryThis PR adds
Confidence Score: 5/5Safe to merge; changes are well-scoped schema additions that follow existing codebase patterns. The new measurement type is a purely additive schema extension with no changes to existing code paths. Ingress validation is strict (bounded Percentage type, discriminated union, endpoint kind literal), outbound field policies cover all model fields, and the previous thread issues are resolved. The two observations are cosmetic/data-quality concerns that do not affect runtime correctness. No files require special attention. Important Files Changed
|
Signed-off-by: Lipika Ramaswamy <lipika.ramaswamy@gmail.com>
| reid_threshold: NonNegativeFloat | ||
| missing_output_rows: NonNegativeInt | None = None | ||
| elapsed_sec: NonNegativeFloat | None = None | ||
| attacker_model: StrictStr | None = None |
There was a problem hiding this comment.
These fields are included in SCALAR_LAST_VALUE_FIELDS, so arbitrary attacker_model and attacker_endpoint_kind values reach aggregate W&B metrics unchanged. Could we constrain attacker_endpoint_kind to known values and omit attacker_model from aggregate metrics, or validate it against an explicit allowlist? A canary test would help preserve the sanitized publication boundary.
There was a problem hiding this comment.
Thanks, agreed. I pushed 6a21815 to tighten this boundary:
attacker_endpoint_kindis now constrained to the known producer values:bigironandnvidia_inference_fallback.attacker_modelis still preserved on the row-level RAT-Bench re-ID record/table for auditability, but is no longer emitted as an aggregate W&B scalar.- Added regression coverage for rejecting unknown endpoint kinds and for ensuring
attacker_modeldoes not appear in aggregate metrics.
Signed-off-by: Lipika Ramaswamy <lipika.ramaswamy@gmail.com>
Related Issue
No linked issue required: maintainer-owned benchmark measurement integration for RAT-Bench re-identification metrics.
Plan Document
No plan required: scoped measurement schema/W&B ingestion extension with regression coverage.
Summary
Adds RAT-Bench re-identification as a first-class measurement record for Anonymizer benchmark ingestion and W&B aggregation.
rat_bench_reidentificationto measurement ingress validation.reid_thresholdas a last-value configuration scalar rather than an averaged metric.[0, 100]at ingress and W&B table-model validation.Type of Change
Contributor Checklist
fix: handle empty entity listskills/anonymizer/SKILL.mdupdated if neededValidation
uv run pytest tests/tools/test_measurement_ingress_completion.py::test_wandb_ingress_accepts_rat_bench_reidentification_summary tests/tools/test_measurement_ingress_completion.py::test_wandb_ingress_rejects_rat_bench_percentages_above_100 tests/tools/test_measurement_wandb_logging.py::test_wandb_aggregates_rat_bench_reidentification_record tests/tools/test_measurement_wandb_logging.py::test_wandb_scalar_registry_matches_package_field_catalogDocumentation and Artifacts
make docs-buildpasses locallymake convert-notebooks