Datasets:
mteb
/

File size: 846 Bytes
bd2df88
 
 
 
 
 
 
 
1c9228a
bd2df88
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import os
from pathlib import Path

import mteb


def test_load_results():
    """Ensures that files can be loaded using MTEB"""
    tests_path = Path(__file__).parent / "mock_cache_dir"

    os.environ["MTEB_CACHE"] = str(tests_path)

    results = mteb.load_results(download_latest=False)

    assert isinstance(results, dict)
    for model in results:
        assert isinstance(results[model], dict)
        for revision in results[model]:
            assert isinstance(results[model][revision], list)
            for result in results[model][revision]:
                assert isinstance(result, mteb.MTEBResults)

    known_model = "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2"
    known_revision = "bf3bf13ab40c3157080a7ab344c831b9ad18b5eb"
    assert known_model in results
    assert known_revision in results[known_model]