-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest_lscd.py
32 lines (25 loc) · 1013 Bytes
/
test_lscd.py
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
28
29
30
31
32
import sys
sys.path.insert(0, ".")
from hydra import initialize, compose, utils
from tests.utils import overrides, initialize_tests_hydra
from src.utils.runner import instantiate, run
from scipy import stats
import unittest
import pytest
initialize_tests_hydra(version_base=None, config_path="../conf", working_dir='results')
# Compose hydra config
config = compose(config_name="config", return_hydra_config=True, overrides=overrides(
{
"task": "lscd_compare",
"task/[email protected]": "apd_compare_all",
"task/[email protected]": "deepmistake",
"task/wic/[email protected]": "WIC_DWUG+XLWSD",
"dataset": "dwug_es_300",
"dataset/split": "full",
"dataset/spelling_normalization": "none",
"dataset/preprocessing": "raw",
"evaluation": "compare",
}
))
score1 = run(*instantiate(config))
print("Spearman: ", score1)