MAINT Remove v0.13.0 deprecated APIs: FoundryScenario alias and piece.role in conversation_analytics#1623
Open
adrian-gavrila wants to merge 4 commits intomicrosoft:mainfrom
Conversation
Remove the FoundryScenario class that was deprecated in favor of RedTeamAgent and marked for removal in version 0.13.0. Update the partner contract test to validate RedTeamAgent directly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Removes the deprecated FoundryScenario alias from the Foundry scenario surface area (scheduled for removal in 0.13.0), standardizing partner-facing usage on RedTeamAgent.
Changes:
- Removed the
FoundryScenarioalias class and stopped exporting it from the Foundry scenario module. - Updated the azure-ai-evaluation partner contract test to validate
RedTeamAgentimportability instead ofFoundryScenario. - Updated
ConversationAnalyticsto useapi_rolewhen emitting conversation messages with similarity.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/partner_integration/azure_ai_evaluation/test_foundry_scenario_contract.py | Updates the partner contract to reference/import RedTeamAgent instead of the removed alias. |
| pyrit/scenario/scenarios/foundry/red_team_agent.py | Removes the deprecated FoundryScenario alias implementation. |
| pyrit/scenario/scenarios/foundry/init.py | Removes FoundryScenario from exports, leaving FoundryStrategy and RedTeamAgent. |
| pyrit/analytics/conversation_analytics.py | Switches from memory.role to memory.api_role when building similarity results. |
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.
Description
Cleanup pass for APIs scheduled for removal in v0.13.0.
FoundryScenarioalias (replaced byRedTeamAgent) and update the partner contract test accordingly.piece.rolewithpiece.api_roleinConversationAnalyticstest_conversation_analytics.pyto mockget_message_pieces()withMessagePieceobjects instead ofPromptMemoryEntry, matching theMemoryInterfacecontract.red_team_agent.py.Related: #1618, #1620
Tests and Documentation