Commit e080ea9
Fixes ToolCallAccuracy raises ZeroDivisionError when called without any arguments. (#1685)
- Fixes: #1684
1. Check for both empty dictionaries:
- If both refs and preds are empty, return 1.0 as you specified in your
logic.
2. Check for empty refs:
- If refs is empty but preds is not, return 0.0 since there's nothing to
compare.
Co-authored-by: ikka <[email protected]>1 parent f14cd85 commit e080ea9
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
38 | 43 | | |
39 | 44 | | |
40 | 45 | | |
| |||
0 commit comments