Spaces:
Runtime error
Runtime error
test_cases = [ | |
{ | |
"predictions": [0, 0], | |
"references": [1, 1], | |
"result": {"mean_average_precision": 1.0}, | |
}, | |
] | |
from mean_average_precision import mean_average_precision | |
m = mean_average_precision() | |
for test_case in test_cases: | |
assert ( | |
m.compute( | |
predictions=test_case["predictions"], references=test_case["references"] | |
) | |
== test_case["result"] | |
) | |