Rename the class
Browse files- mteb_evaluate.py +3 -2
mteb_evaluate.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
from argparse import ArgumentParser, Namespace
|
2 |
from typing import List, Optional
|
3 |
|
4 |
-
from model_api import
|
5 |
from mteb import MTEB
|
6 |
|
7 |
RETRIEVAL_TASKS: List[str] = [
|
@@ -27,6 +27,7 @@ def get_arguments() -> Namespace:
|
|
27 |
parser.add_argument('--url', type=str, default='https://api.sionic.ai/v1/embedding', help='api server url')
|
28 |
parser.add_argument('--instruction', type=str, default='query: ', help='query instruction')
|
29 |
parser.add_argument('--batch_size', type=int, default=128)
|
|
|
30 |
parser.add_argument('--output_dir', type=str, default='./result/v1')
|
31 |
return parser.parse_args()
|
32 |
|
@@ -34,7 +35,7 @@ def get_arguments() -> Namespace:
|
|
34 |
if __name__ == '__main__':
|
35 |
args = get_arguments()
|
36 |
|
37 |
-
model =
|
38 |
|
39 |
task_names: List[str] = [t.description['name'] for t in MTEB(task_types=None, task_langs=['en']).tasks]
|
40 |
|
|
|
1 |
from argparse import ArgumentParser, Namespace
|
2 |
from typing import List, Optional
|
3 |
|
4 |
+
from model_api import SionicEmbeddingModel
|
5 |
from mteb import MTEB
|
6 |
|
7 |
RETRIEVAL_TASKS: List[str] = [
|
|
|
27 |
parser.add_argument('--url', type=str, default='https://api.sionic.ai/v1/embedding', help='api server url')
|
28 |
parser.add_argument('--instruction', type=str, default='query: ', help='query instruction')
|
29 |
parser.add_argument('--batch_size', type=int, default=128)
|
30 |
+
parser.add_argument('--dimension', type=int, default=2048)
|
31 |
parser.add_argument('--output_dir', type=str, default='./result/v1')
|
32 |
return parser.parse_args()
|
33 |
|
|
|
35 |
if __name__ == '__main__':
|
36 |
args = get_arguments()
|
37 |
|
38 |
+
model = SionicEmbeddingModel(url=args.url, instruction=args.instruction, batch_size=args.batch_size, dimension=args.dimension)
|
39 |
|
40 |
task_names: List[str] = [t.description['name'] for t in MTEB(task_types=None, task_langs=['en']).tasks]
|
41 |
|