Repository navigation
fix: report refused list elements with field comparison rules #364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
348dc59
7fefbbb
b147fb8
7664719
9fa562b
44f68ce
20d13e7
ddbd94b
5049709
cc2bd10
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |
| from typing import Any, Dict, List, Optional | ||
|
|
||
| from .comparison_helper_base import ComparisonHelperBase | ||
| from .null_helper import NullHelper | ||
| from .reporting_context import ReportingContext | ||
|
|
||
|
|
||
|
|
@@ -162,12 +163,14 @@ def _extract_entries_from_objects( | |
| if field_result is not None and "fields" in field_result and not field_is_match: | ||
| field_reason = "non-matching or unmatched items" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This reason replaces the score and threshold, and it also fires for a single nested object below its threshold. In the repro, |
||
|
|
||
| # Handle missing fields | ||
| if pred_nested_val is None and gt_nested_val is not None: | ||
| # Keep the scored NaN-as-missing decision when formatting child fields. | ||
| gt_missing = gt_nested_val is None or NullHelper.is_nan(gt_nested_val) | ||
| pred_missing = pred_nested_val is None or NullHelper.is_nan(pred_nested_val) | ||
| if pred_missing and not gt_missing: | ||
| field_reason = "false negative (unmatched ground truth)" | ||
| field_is_match = False | ||
| field_score = 0.0 | ||
| elif gt_nested_val is None and pred_nested_val is not None: | ||
| elif gt_missing and not pred_missing: | ||
| field_reason = "false alarm (unmatched prediction)" | ||
| field_is_match = False | ||
| field_score = 0.0 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add one sentence here: nested list and nested object rows in
field_comparisonsnow reportmatch=Falsewhen scoring recorded any non-match beneath them, even if their score meets the threshold. Users who filter onmatchwill see those rows change.