Repository navigation
Feat/shoaib annotation consistency - #10
Merged
Merged
Conversation
khadijja1
approved these changes
Sep 8, 2026
Khubaib8281
approved these changes
Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Implements check_annotation_consistency — Week 4 deliverable, flags samples with
annotation confidence below a configurable threshold.
Which module(s) does it touch?
inference_audit/checks/annotation_consistency.py (new)
tests/test_annotation_consistency.py (new)
How did you test it?
Ran: pytest tests/test_annotation_consistency.py -v
============================= test session starts ==============================
collected 10 items
test_high_confidence_scores_high PASSED
test_low_confidence_scores_in_expected_range PASSED
test_no_confidence_column_provided_is_graceful_skip PASSED
test_missing_column_returns_none_score PASSED
test_empty_dataframe_returns_none_score PASSED
test_invalid_threshold_above_one_returns_none PASSED
test_invalid_threshold_negative_returns_none PASSED
test_null_confidence_values_reported_explicitly PASSED
test_all_null_confidence_returns_none PASSED
test_non_numeric_values_returns_none PASSED
============================== 10 passed in 0.47s ==============================
Also ran against both real fixtures: high_confidence.csv scored 100.0 (expected 90-100), low_confidence.csv scored 45.4 (expected 30-50) — both landed cleanly inside the Role Guide's expected ranges, no discrepancy to flag on this check.
Edge cases handled:
required for check_label_distribution's null-label handling
Checklist: