Skip to content

[RedTeam] Call evaluate_with_rai_service instead of evaluate#40520

Merged
slister1001 merged 9 commits intoAzure:mainfrom
slister1001:annotations
Apr 20, 2025
Merged

[RedTeam] Call evaluate_with_rai_service instead of evaluate#40520
slister1001 merged 9 commits intoAzure:mainfrom
slister1001:annotations

Conversation

@slister1001
Copy link
Member

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.

@github-actions github-actions bot added the Evaluation Issues related to the client library for Azure AI Evaluation label Apr 15, 2025
@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@slister1001 slister1001 marked this pull request as ready for review April 16, 2025 20:53
Copilot AI review requested due to automatic review settings April 16, 2025 20:53
@slister1001 slister1001 requested a review from a team as a code owner April 16, 2025 20:53
Copy link
Contributor

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.

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

Comments suppressed due to low confidence (2)

sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_red_team.py:1371

  • It appears that 'strategy' is used instead of 'strategy_name' (as seen in the logging call), which could lead to unexpected behavior if 'strategy' is undefined. Consider replacing 'strategy' with 'strategy_name' for consistency.
self.red_team_info[self._get_strategy_name(strategy)][risk_category.value]["evaluation_result_file"] = str(result_path)

sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_red_team.py:756

  • Changing the batch index from an incremented value (batch_idx+1) to a constant (1) may be unintentional. Verify that resetting batch_idx to 1 is the intended behavior for processing output files.
self._write_pyrit_outputs_to_file(orchestrator=orchestrator, strategy_name=strategy_name, risk_category=risk_category, batch_idx=1)

@slister1001 slister1001 merged commit 1d83aaf into Azure:main Apr 20, 2025
19 checks passed
cRui861 pushed a commit that referenced this pull request May 14, 2025
* call evaluate_with_rai_service instead of evaluate

* clean up

* bug fixes

* add retry logic to service calls and send_prompt_async

* small fixes

* update retry to handle asyncio timeout

* fix attack success
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.

4 participants