File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -148,11 +148,10 @@ async def evaluate_with_rai_service_with_retry():
148148 # Use sync_evals endpoint for OneDP projects, legacy endpoint for others
149149 if is_onedp_project (self .azure_ai_project ):
150150 # If using sync API use hate_unfairness rather than hate_fairness
151- if metric_name == "hate_fairness" :
152- metric_name = "hate_unfairness"
151+ effective_metric_name = "hate_unfairness" if metric_name == "hate_fairness" else metric_name
153152 return await evaluate_with_rai_service_sync (
154153 data = query_response ,
155- metric_name = metric_name ,
154+ metric_name = effective_metric_name ,
156155 project_scope = self .azure_ai_project ,
157156 credential = self .credential ,
158157 annotation_task = annotation_task ,
You can’t perform that action at this time.
0 commit comments