test: add unit tests for evaluation metrics module#250
Open
YASHBHIWANIA wants to merge 2 commits intoThe-OpenROAD-Project:masterfrom
Open
test: add unit tests for evaluation metrics module#250YASHBHIWANIA wants to merge 2 commits intoThe-OpenROAD-Project:masterfrom
YASHBHIWANIA wants to merge 2 commits intoThe-OpenROAD-Project:masterfrom
Conversation
Signed-off-by: YASHBHIWANIA <yashbhiwania772@gmail.com>
5381d1b to
c4a2d47
Compare
Signed-off-by: YASHBHIWANIA <yashbhiwania772@gmail.com>
c4a2d47 to
b0883c1
Compare
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.
Summary
The evaluation metrics module (
auto_evaluation/src/metrics/) hadzero test coverage. This PR adds a comprehensive unit test suite
covering all metric factory functions.
Changes
evaluation/auto_evaluation/tests/test_metrics.pywith30 unit tests covering:
retrieval.py— contextual precision, recall, hallucinationmetrics + NotImplementedError cases for protobuf-incompatible
metrics
content.py— answer relevancy, bias, toxicity metricsgeval.py— correctness GEval metricevaluation/auto_evaluation/tests/conftest.pyto configurecorrect Python path for test discovery
Test Results
30 passed in 0.15s
Why this matters
These tests document expected behavior of metric factory functions,
catch regressions when upgrading deepeval, and explicitly document
two known broken metrics (ContextualRelevancy and Faithfulness)
due to protobuf incompatibility.
Relates to #248