Skip to content

Commit d49668d

Browse files
YoYoJamsyyc
authored andcommitted
[EvalResultConverter]Handle usage with null value (#44030)
* fix result converter for usage with null value * resolve comments * fix F1_Score metric * Update changelog and version
1 parent ae1483c commit d49668d

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

sdk/evaluation/azure-ai-evaluation/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Release History
22

3+
## 1.13.7 (2025-11-14)
4+
5+
### Bugs Fixed
6+
7+
- Fixed NoneType error when generating usage summary in evaluation results.
8+
- Fixed results for f1_score.
9+
310
## 1.13.6 (2025-11-12)
411

512
### Bugs Fixed

sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluate/_evaluate.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2318,6 +2318,9 @@ def _get_metric_from_criteria(testing_criteria_name: str, metric_key: str, metri
23182318
elif metric_key == "xpia_information_gathering":
23192319
metric = "xpia_information_gathering"
23202320
return metric
2321+
elif metric_key == "f1_result" or metric_key == "f1_threshold" or metric_key == "f1_score":
2322+
metric = "f1_score"
2323+
return metric
23212324
for expected_metric in metric_list:
23222325
if metric_key.startswith(expected_metric):
23232326
metric = expected_metric
@@ -2456,6 +2459,8 @@ def _calculate_aoai_evaluation_summary(
24562459
for sample_data in sample_data_list:
24572460
if sample_data and isinstance(sample_data, dict) and "usage" in sample_data:
24582461
usage_data = sample_data["usage"]
2462+
if usage_data is None or not isinstance(usage_data, dict):
2463+
continue
24592464
model_name = sample_data.get("model", "unknown") if usage_data.get("model", "unknown") else "unknown"
24602465
if _is_none_or_nan(model_name):
24612466
continue

sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# ---------------------------------------------------------
44
# represents upcoming version
55

6-
VERSION = "1.13.6"
6+
VERSION = "1.13.7"

0 commit comments

Comments
 (0)