Datasets:
mteb
/

Samoed commited on
Commit
7695129
·
unverified ·
1 Parent(s): e7d51d9

fix tests (#42)

Browse files
Files changed (2) hide show
  1. paths.json +0 -0
  2. 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, dict)
16
- for model in results:
17
- assert isinstance(results[model], dict)
18
- for revision in results[model]:
19
- assert isinstance(results[model][revision], list)
20
- for result in results[model][revision]:
21
- assert isinstance(result, mteb.MTEBResults)
22
 
23
- known_model = "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2"
24
- known_revision = "bf3bf13ab40c3157080a7ab344c831b9ad18b5eb"
25
- assert known_model in results
26
- assert known_revision in results[known_model]
 
 
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"