Skip to content

Commit f454ee3

Browse files
Copilotm7md7sien
andauthored
Fix test assertions for new unified output format and apply black formatting (#46336)
Agent-Logs-Url: https://github.com/Azure/azure-sdk-for-python/sessions/23f40ca5-7114-46ec-89be-a369e38ac971 Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: m7md7sien <16615690+m7md7sien@users.noreply.github.com>
1 parent a525806 commit f454ee3

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_tool_call_accuracy/_tool_call_accuracy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ async def _do_eval(self, eval_input: Dict) -> Dict[str, Union[float, str]]: # t
232232
if _is_intermediate_response(eval_input.get("response")):
233233
return self._return_not_applicable_result(
234234
"Intermediate response. Please provide the agent's final response for evaluation.",
235-
self.threshold
235+
self.threshold,
236236
)
237237

238238
# Preprocess messages if they are lists

sdk/evaluation/azure-ai-evaluation/tests/unittests/test_agent_evaluators.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ def test_tool_call_accuracy_evaluator_missing_inputs(self, mock_model_config):
6666
}
6767
],
6868
)
69+
assert result[f"{ToolCallAccuracyEvaluator._RESULT_KEY}_score"] is None
70+
assert result[f"{ToolCallAccuracyEvaluator._RESULT_KEY}_result"] == "not_applicable"
71+
assert result[f"{ToolCallAccuracyEvaluator._RESULT_KEY}_status"] == "skipped"
6972
assert (
70-
result[ToolCallAccuracyEvaluator._RESULT_KEY] == ToolCallAccuracyEvaluator._DEFAULT_TOOL_CALL_ACCURACY_SCORE
71-
)
72-
assert (
73-
"not applicable" in result[f"{ToolCallAccuracyEvaluator._RESULT_KEY}_reason"].lower()
73+
"not applicable" in result[f"{ToolCallAccuracyEvaluator._RESULT_KEY}_reasoning"].lower()
7474
and ToolCallAccuracyEvaluator._TOOL_DEFINITIONS_MISSING_MESSAGE
75-
in result[f"{ToolCallAccuracyEvaluator._RESULT_KEY}_reason"]
75+
in result[f"{ToolCallAccuracyEvaluator._RESULT_KEY}_reasoning"]
7676
)

0 commit comments

Comments
 (0)