Skip to content

Conversation

kdestin
Copy link
Member

@kdestin kdestin commented Oct 14, 2025

Description

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.

@kdestin kdestin requested a review from a team as a code owner October 14, 2025 15:24
@Copilot Copilot AI review requested due to automatic review settings October 14, 2025 15:24
Copy link
Contributor

@Copilot Copilot AI left a comment

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 fixes an issue in the Azure OpenAI evaluation module where column mappings were not properly honoring renamed columns during data source processing. The change refactors the column mapping logic to use a proper data structure and fixes the nested value insertion to use the correct destination column name.

Key Changes

  • Introduces a ColumnMapping NamedTuple to better structure column mapping data
  • Fixes the nested dictionary insertion to use the destination column name instead of the source column name
  • Modernizes string processing with removeprefix() and removesuffix() methods

cursor = nxt
leaf_key = rel_parts[-1]
cursor[leaf_key] = str_val
cursor[mapping.destination_column] = str_val
Copy link

Copilot AI Oct 14, 2025

Choose a reason for hiding this comment

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

This line uses mapping.destination_column as the key, but it should use the last segment of the value path (mapping.value_path[-1]) to maintain the correct nested structure. The destination column name is meant for the overall mapping, not the leaf key in the nested dictionary.

Suggested change
cursor[mapping.destination_column] = str_val
cursor[mapping.value_path[-1]] = str_val

Copilot uses AI. Check for mistakes.

@github-actions github-actions bot added the Evaluation Issues related to the client library for Azure AI Evaluation label Oct 14, 2025
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.

1 participant