Skip to content

Preserve explicit passed when handling _result/_label keys#46836

Draft
m7md7sien wants to merge 1 commit into
mainfrom
mohessie/fix_overwriting_passed_bug
Draft

Preserve explicit passed when handling _result/_label keys#46836
m7md7sien wants to merge 1 commit into
mainfrom
mohessie/fix_overwriting_passed_bug

Conversation

@m7md7sien
Copy link
Copy Markdown
Contributor

In _update_metric_value, the _result/result/_label branch unconditionally derived passed from the label value for azure_ai_evaluator criteria, overwriting any passed already set by an earlier metric_key == "passed" iteration.

Guard the derivation with "passed" not in metric_dict so an explicitly provided passed value is preserved.

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 API spec, a link to the pull request containing these API spec changes should be 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.

In `_update_metric_value`, the `_result`/`result`/`_label` branch
unconditionally derived `passed` from the label value for
`azure_ai_evaluator` criteria, overwriting any `passed` already set by
an earlier `metric_key == "passed"` iteration.

Guard the derivation with `"passed" not in metric_dict` so an
explicitly provided `passed` value is preserved.
@github-actions github-actions Bot added the Evaluation Issues related to the client library for Azure AI Evaluation label May 11, 2026
@ela-ine
Copy link
Copy Markdown
Contributor

ela-ine commented May 12, 2026

add unit tests

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.

2 participants