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

Update binarization to be individual params #40168

Merged
merged 127 commits into from
Mar 24, 2025

Conversation

nagkumar91
Copy link
Member

@nagkumar91 nagkumar91 commented Mar 20, 2025

Description

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Sorry, something went wrong.

nagkumar91 and others added 30 commits October 1, 2024 14:51

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
remove required keys

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@Copilot Copilot bot review requested due to automatic review settings March 20, 2025 22:11
@nagkumar91 nagkumar91 requested a review from a team as a code owner March 20, 2025 22:11
@github-actions github-actions bot added the Evaluation Issues related to the client library for Azure AI Evaluation label Mar 20, 2025

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors evaluators to accept individual threshold parameters instead of using a single dictionary-based threshold, improving parameter clarity and type safety.

  • Updated QAEvaluator to have separate parameters for groundedness, relevance, coherence, fluency, similarity, and f1_score thresholds.
  • Updated ContentSafetyEvaluator to accept individual thresholds for violence, sexual content, self-harm, and hate/unfairness evaluations.
  • Updated RougeScoreEvaluator, sample usage, and tests to use individual threshold parameters.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_qa/_qa.py Replaced dictionary-based thresholds with individual parameters and updated type checking.
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_content_safety/_content_safety.py Modified threshold parameter to individual thresholds with type checking for int.
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_rouge/_rouge.py Updated threshold parameters to individual floats with corresponding type checks.
sdk/evaluation/azure-ai-evaluation/samples/evaluation_samples_threshold.py Updated usage examples for QAEvaluator and RougeScoreEvaluator to reflect individual thresholds.
sdk/evaluation/azure-ai-evaluation/tests/unittests/test_evaluators/test_threshold_behavior.py Updated tests to use individual threshold parameters instead of dictionaries.
Comments suppressed due to low confidence (1)

sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_qa/_qa.py:82

  • Consider enforcing a stricter type check for 'f1_score_threshold' (e.g., ensure it is a float) rather than accepting an int, to be consistent with its documented type.
for name, value in [
@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

azure-ai-evaluation

@w-javed w-javed merged commit 8d3bb37 into Azure:main Mar 24, 2025
19 checks passed
@nagkumar91 nagkumar91 deleted the task/update_binarization branch March 25, 2025 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Evaluation Issues related to the client library for Azure AI Evaluation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants