Skip to content

fixed double counting issue for precision / average precision#55

Merged
pantonante merged 1 commit intomainfrom
fix/precision-double-counting
Apr 2, 2024
Merged

fixed double counting issue for precision / average precision#55
pantonante merged 1 commit intomainfrom
fix/precision-double-counting

Conversation

@yisz
Copy link
Contributor

@yisz yisz commented Apr 1, 2024

Ellipsis 🚀 This PR description was created by Ellipsis for commit acded6d.

Summary:

This PR fixes a double counting issue in precision and average precision calculations and downgrades the protobuf version.

Key points:

  • Modified precision_recall_f1.py to prevent double counting of retrieved components.
  • Updated ranked.py to break the loop after finding the first relevant match.
  • Downgraded protobuf version in pyproject.toml.

Generated with ❤️ by ellipsis.dev

@yisz yisz requested a review from pantonante April 1, 2024 23:19
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me!

  • Reviewed the entire pull request up to acded6d
  • Looked at 50 lines of code in 3 files
  • Took 1 minute and 11 seconds to review
More info
  • Skipped 0 files when reviewing.
  • Skipped posting 3 additional comments because they didn't meet confidence threshold of 50%.
1. continuous_eval/metrics/retrieval/precision_recall_f1.py:33:
  • Assessed confidence : 50%
  • Comment:
    The conversion of 'gt_components' to a set might lead to loss of information if the ground truth context is supposed to have duplicates. Please ensure that this is not the case.
  • Reasoning:
    The changes in precision_recall_f1.py seem to be addressing the issue of double counting in precision calculation. The author has introduced a flag 'ret_component_matched' to ensure that a retrieved component is only counted once even if it matches with multiple ground truth components. This seems to be a logical fix. However, the conversion of 'gt_components' to a set might lead to loss of information if the ground truth context is supposed to have duplicates. I need to check the rest of the codebase to understand if this is the case.
2. continuous_eval/metrics/retrieval/ranked.py:37:
  • Assessed confidence : 0%
  • Comment:
    The 'break' statement ensures that a retrieved chunk is only counted once even if it matches with multiple ground truth chunks. This seems to be a logical fix for the double counting issue.
  • Reasoning:
    The changes in ranked.py seem to be addressing the issue of double counting in the calculation of average precision. The author has introduced a 'break' statement to ensure that a retrieved chunk is only counted once even if it matches with multiple ground truth chunks. This seems to be a logical fix.
3. pyproject.toml:24:
  • Assessed confidence : 50%
  • Comment:
    The protobuf version has been downgraded from 4.25.1 to 4.23.4. Please ensure that this doesn't affect other parts of the codebase that rely on features available in the newer version of protobuf.
  • Reasoning:
    The change in pyproject.toml seems to be a downgrade of the protobuf version from 4.25.1 to 4.23.4. This might be due to compatibility issues with other dependencies. However, it's important to ensure that this downgrade doesn't affect other parts of the codebase that rely on features available in the newer version of protobuf.

Workflow ID: wflow_goALjd5d5StLHuB0


Not what you expected? You can customize the content of the reviews using rules. Learn more here.

@pantonante pantonante merged commit f90f2cd into main Apr 2, 2024
@pantonante pantonante deleted the fix/precision-double-counting branch April 2, 2024 00:29
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.

2 participants