Skip to content

fix: update required columns in RefusalRate (docs) #2008

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

DmitrySirakov
Copy link
Contributor

@DmitrySirakov DmitrySirakov commented Apr 13, 2025

Overview

This PR fixes a bug in the RefusalRate docs metric implementation. The ValidationError occurred because the required fields for a SingleTurnSample were set to {"response", "reference"}, while the metric uses the "user_input" field for evaluation. This mismatch causes a validation error when creating a RefusalInput instance.

Changes Made

  • Updated the _required_columns for MetricType.SINGLE_TURN in RefusalRate:
    • From: {"response", "reference"}
    • To: {"response", "user_input"}
  • This change ensures that the "user_input" field is present during validation, preventing any ValidationError.

Issue Reference

This addresses the issue described in issue #1999.

Verified

This commit was signed with the committer’s verified signature.
bjohansebas Sebastian Beltran
…o "user_input"
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Apr 13, 2025
@DmitrySirakov
Copy link
Contributor Author

Hi @sahusiddharth, can u check pls this PR?

@DmitrySirakov
Copy link
Contributor Author

👉👈 @jjmachan, can u check please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant