Skip to content
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

Add BLEU metric to Evidently #1486

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Jai0401
Copy link

@Jai0401 Jai0401 commented Feb 14, 2025

Fixes #1319

Add BLEU metric implementation to compute scores for each row and a summary BLEU metric for the dataset.

  • New BLEU Metric Implementation

    • Create src/evidently/metrics/bleu_metric.py to implement the BLEU metric.
    • Define BLEUMetricResult and BLEUMetric classes.
    • Implement BLEUMetricRenderer for HTML rendering of BLEU scores.
  • Integration with Existing Code

    • Update src/evidently/metric_preset/text_evals.py to include BLEU metric in the descriptors list.
    • Update src/evidently/metrics/__init__.py to import and reference the BLEU metric.
  • Testing

    • Add tests/metrics/test_bleu_metric.py to include tests for the BLEU metric.

Fixes evidentlyai#1319

Add BLEU metric implementation to compute scores for each row and a summary BLEU metric for the dataset.

* **New BLEU Metric Implementation**
  - Create `src/evidently/metrics/bleu_metric.py` to implement the BLEU metric.
  - Define BLEUMetricResult and BLEUMetric classes.
  - Implement BLEUMetricRenderer for HTML rendering of BLEU scores.

* **Integration with Existing Code**
  - Update `src/evidently/metric_preset/text_evals.py` to include BLEU metric in the descriptors list.
  - Update `src/evidently/metrics/__init__.py` to import and reference the BLEU metric.

* **Testing**
  - Add `tests/metrics/test_bleu_metric.py` to include tests for the BLEU metric.
@Jai0401 Jai0401 marked this pull request as draft February 15, 2025 12:19
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.

Add a new BLEU metric to Evidently
1 participant