Python: Fix Eval samples #4033
Merged
eavanvalkenburg merged 4 commits intomicrosoft:mainfrom Feb 18, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the Python evaluation samples (self_reflection and red_teaming) by updating them to use the correct APIs and dependencies.
Changes:
- Updates dependency versions in uv.lock (anthropic, github-copilot-sdk, mem0ai, pandas, uv)
- Migrates self_reflection sample from
AzureOpenAIChatClienttoAzureOpenAIResponsesClient - Updates default models from
gpt-4.1togpt-5.2 - Improves file path handling using
Pathfor better cross-platform compatibility - Adds async project client support for proper Azure AI Foundry integration
- Updates red_team_agent_sample callback signature to match the expected interface
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| python/uv.lock | Updates package versions: anthropic (0.80.0→0.81.0), github-copilot-sdk (0.1.24→0.1.25), mem0ai (1.0.3→1.0.4), pandas (3.0.0→3.0.1), uv (0.10.3→0.10.4) |
| python/samples/05-end-to-end/evaluation/self_reflection/self_reflection.py | Migrates from AzureOpenAIChatClient to AzureOpenAIResponsesClient, adds async project client, improves path handling, updates default models |
| python/samples/05-end-to-end/evaluation/self_reflection/README.md | Updates documentation to reflect AzureOpenAIResponsesClient usage and gpt-5.2 models |
| python/samples/05-end-to-end/evaluation/red_teaming/red_team_agent_sample.py | Adds PEP 723 metadata, fixes callback signature to match RedTeam API expectations, improves error handling |
python/samples/05-end-to-end/evaluation/self_reflection/self_reflection.py
Show resolved
Hide resolved
python/samples/05-end-to-end/evaluation/self_reflection/self_reflection.py
Show resolved
Hide resolved
python/samples/05-end-to-end/evaluation/self_reflection/self_reflection.py
Show resolved
Hide resolved
victordibia
approved these changes
Feb 18, 2026
markwallace-microsoft
approved these changes
Feb 18, 2026
ccb181a to
805c3d4
Compare
Member
Python Test Coverage Report •
Python Unit Test Overview
|
||||||||||||||||||||||||||||||
giles17
approved these changes
Feb 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Fixes the samples using evals, both red team and self reflection.
Description
Contribution Checklist