Skip to content

Commit 925e2e1

Browse files
committed
fix imports
1 parent db01766 commit 925e2e1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_result_processor.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
This module handles the processing, aggregation, and formatting of red team evaluation results.
88
"""
99

10+
import copy
1011
import hashlib
1112
import json
1213
import math
@@ -18,6 +19,8 @@
1819

1920
import pandas as pd
2021

22+
from azure.ai.evaluation._common.constants import EvaluationMetrics
23+
2124
# Local imports
2225
from ._red_team_result import (
2326
RedTeamResult,
@@ -1629,8 +1632,6 @@ def get_app_insights_redacted_results(self, results: List[Dict]) -> List[Dict]:
16291632
Returns:
16301633
A deep copy of results with user messages redacted for applicable risk categories
16311634
"""
1632-
import copy
1633-
16341635
# Create a deep copy to avoid modifying the original data
16351636
redacted_results = copy.deepcopy(results)
16361637

@@ -1676,8 +1677,6 @@ def _should_redact_for_risk_category(self, risk_category: str) -> bool:
16761677
Returns:
16771678
True if the risk category requires redaction, False otherwise
16781679
"""
1679-
from azure.ai.evaluation._common.constants import EvaluationMetrics
1680-
16811680
redaction_required_categories = {
16821681
EvaluationMetrics.PROHIBITED_ACTIONS,
16831682
EvaluationMetrics.TASK_ADHERENCE,

0 commit comments

Comments
 (0)