-
Notifications
You must be signed in to change notification settings - Fork 4
/
prepare_datasets.py
41 lines (30 loc) · 1.02 KB
/
prepare_datasets.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
33
34
35
36
37
38
39
40
41
import argparse
import wandb
import sys
import os
import subprocess
from utils import *
def main():
preprocess_files = {
TRANSE: 'models/embeddings/transe/preprocess.py',
PGPR : 'models/PGPR/preprocess.py',
CAFE : 'models/CAFE/preprocess.py',
UCPR : 'models/UCPR/preprocess.py',
KGAT : '',
CKE : '',
CFKG : '',
BPRMF : '',
NFM : '',
FM : '',
}
for dataset_name in DATASETS:
for model_name in preprocess_files:
if model_name not in (PATH_REASONING_METHODS+EMBEDDING_METHODS):
continue
# print(f'Model {args.model} already processed')
# return
CMD = ["python3", os.path.basename(preprocess_files[model_name]) , "--dataset" , dataset_name]
subprocess.call(CMD, cwd=os.path.dirname(preprocess_files[model_name] ) )
if __name__ == '__main__':
parser = argparse.ArgumentParser()
main()