eubinecto
commited on
Commit
·
d2dce47
1
Parent(s):
1bf3d62
requirements.txt added, removed dependencies from pandas
Browse files- idiomify/fetchers.py +16 -12
- requirements.txt +66 -0
idiomify/fetchers.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
|
2 |
import yaml
|
3 |
import wandb
|
4 |
-
import
|
5 |
from idiomify.models import Alpha, Gamma
|
6 |
from idiomify.paths import idiom2def_dir, CONFIG_YAML, idioms_dir
|
7 |
|
@@ -12,11 +12,13 @@ def fetch_idiom2def(ver: str) -> List[Tuple[str, str]]:
|
|
12 |
artifact_path = idiom2def_dir(ver)
|
13 |
artifact.download(root=str(artifact_path))
|
14 |
tsv_path = artifact_path / "all.tsv"
|
15 |
-
|
16 |
-
|
17 |
-
(
|
18 |
-
|
19 |
-
|
|
|
|
|
20 |
|
21 |
|
22 |
def fetch_idioms(ver: str) -> List[str]:
|
@@ -24,11 +26,13 @@ def fetch_idioms(ver: str) -> List[str]:
|
|
24 |
artifact_path = idioms_dir(ver)
|
25 |
artifact.download(root=str(artifact_path))
|
26 |
tsv_path = artifact_path / "all.tsv"
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
|
|
|
|
32 |
|
33 |
|
34 |
# models
|
|
|
1 |
+
import csv
|
2 |
import yaml
|
3 |
import wandb
|
4 |
+
from typing import Tuple, List
|
5 |
from idiomify.models import Alpha, Gamma
|
6 |
from idiomify.paths import idiom2def_dir, CONFIG_YAML, idioms_dir
|
7 |
|
|
|
12 |
artifact_path = idiom2def_dir(ver)
|
13 |
artifact.download(root=str(artifact_path))
|
14 |
tsv_path = artifact_path / "all.tsv"
|
15 |
+
with open(tsv_path, 'r') as fh:
|
16 |
+
reader = csv.reader(fh, delimiter="\t")
|
17 |
+
next(reader)
|
18 |
+
return [
|
19 |
+
(row[0], row[1])
|
20 |
+
for row in reader
|
21 |
+
]
|
22 |
|
23 |
|
24 |
def fetch_idioms(ver: str) -> List[str]:
|
|
|
26 |
artifact_path = idioms_dir(ver)
|
27 |
artifact.download(root=str(artifact_path))
|
28 |
tsv_path = artifact_path / "all.tsv"
|
29 |
+
with open(tsv_path, 'r') as fh:
|
30 |
+
reader = csv.reader(fh, delimiter="\t")
|
31 |
+
next(reader)
|
32 |
+
return [
|
33 |
+
(row[0])
|
34 |
+
for row in reader
|
35 |
+
]
|
36 |
|
37 |
|
38 |
# models
|
requirements.txt
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
absl-py==1.0.0
|
2 |
+
aiohttp==3.8.1
|
3 |
+
aiosignal==1.2.0
|
4 |
+
async-timeout==4.0.2
|
5 |
+
attrs==21.4.0
|
6 |
+
cachetools==4.2.4
|
7 |
+
certifi==2021.10.8
|
8 |
+
charset-normalizer==2.0.10
|
9 |
+
click==8.0.3
|
10 |
+
configparser==5.2.0
|
11 |
+
docker-pycreds==0.4.0
|
12 |
+
filelock==3.4.2
|
13 |
+
frozenlist==1.3.0
|
14 |
+
fsspec==2022.1.0
|
15 |
+
future==0.18.2
|
16 |
+
gitdb==4.0.9
|
17 |
+
GitPython==3.1.26
|
18 |
+
google-auth==2.3.3
|
19 |
+
google-auth-oauthlib==0.4.6
|
20 |
+
grpcio==1.43.0
|
21 |
+
huggingface-hub==0.4.0
|
22 |
+
idna==3.3
|
23 |
+
importlib-metadata==4.10.1
|
24 |
+
joblib==1.1.0
|
25 |
+
Markdown==3.3.6
|
26 |
+
multidict==5.2.0
|
27 |
+
numpy==1.22.1
|
28 |
+
oauthlib==3.1.1
|
29 |
+
packaging==21.3
|
30 |
+
pathtools==0.1.2
|
31 |
+
promise==2.3
|
32 |
+
protobuf==3.19.3
|
33 |
+
psutil==5.9.0
|
34 |
+
pyasn1==0.4.8
|
35 |
+
pyasn1-modules==0.2.8
|
36 |
+
pyDeprecate==0.3.1
|
37 |
+
pyparsing==3.0.6
|
38 |
+
python-dateutil==2.8.2
|
39 |
+
pytorch-lightning==1.5.8
|
40 |
+
PyYAML==6.0
|
41 |
+
regex==2022.1.18
|
42 |
+
requests==2.27.1
|
43 |
+
requests-oauthlib==1.3.0
|
44 |
+
rsa==4.8
|
45 |
+
sacremoses==0.0.47
|
46 |
+
sentry-sdk==1.5.2
|
47 |
+
shortuuid==1.0.8
|
48 |
+
six==1.16.0
|
49 |
+
smmap==5.0.0
|
50 |
+
subprocess32==3.5.4
|
51 |
+
tensorboard==2.7.0
|
52 |
+
tensorboard-data-server==0.6.1
|
53 |
+
tensorboard-plugin-wit==1.8.1
|
54 |
+
termcolor==1.1.0
|
55 |
+
tokenizers==0.10.3
|
56 |
+
torch==1.10.1
|
57 |
+
torchmetrics==0.7.0
|
58 |
+
tqdm==4.62.3
|
59 |
+
transformers==4.15.0
|
60 |
+
typing_extensions==4.0.1
|
61 |
+
urllib3==1.26.8
|
62 |
+
wandb==0.12.9
|
63 |
+
Werkzeug==2.0.2
|
64 |
+
yarl==1.7.2
|
65 |
+
yaspin==2.1.0
|
66 |
+
zipp==3.7.0
|