fix tests (#42)
Browse files- paths.json +0 -0
- tests/test_load_results.py +10 -11
paths.json
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
tests/test_load_results.py
CHANGED
@@ -2,6 +2,7 @@ import os
|
|
2 |
from pathlib import Path
|
3 |
|
4 |
import mteb
|
|
|
5 |
|
6 |
|
7 |
def test_load_results():
|
@@ -12,15 +13,13 @@ def test_load_results():
|
|
12 |
|
13 |
results = mteb.load_results(download_latest=False)
|
14 |
|
15 |
-
assert isinstance(results,
|
16 |
-
for
|
17 |
-
|
18 |
-
|
19 |
-
assert isinstance(results[model][revision], list)
|
20 |
-
for result in results[model][revision]:
|
21 |
-
assert isinstance(result, mteb.MTEBResults)
|
22 |
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
assert
|
|
|
|
2 |
from pathlib import Path
|
3 |
|
4 |
import mteb
|
5 |
+
from mteb.load_results.task_results import TaskResult
|
6 |
|
7 |
|
8 |
def test_load_results():
|
|
|
13 |
|
14 |
results = mteb.load_results(download_latest=False)
|
15 |
|
16 |
+
assert isinstance(results, mteb.BenchmarkResults)
|
17 |
+
for model_results in results.model_results:
|
18 |
+
for model_result in model_results:
|
19 |
+
assert isinstance(model_result, TaskResult)
|
|
|
|
|
|
|
20 |
|
21 |
+
test_model_name = "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2"
|
22 |
+
model_results = mteb.load_results(models=[test_model_name])
|
23 |
+
model_result = model_results[0]
|
24 |
+
assert model_result.model_name == test_model_name
|
25 |
+
assert model_result.model_revision == "bf3bf13ab40c3157080a7ab344c831b9ad18b5eb"
|