This is the code of Team TIEG-Youpu in the WikiKG90Mv2-LSC track of OGB-LSC @ NeurIPS 2022.
Team Members: Feng Nie, Zhixiu Ye, Sifa Xie, Shuang Wu, Xin Yuan, Liang Yao, Jiazhen Peng, Xu Cheng.
ogb >= 1.3.3
torch >= 1.7.0
dgl == 0.4.3
In the recall stage, we used the following methods.
Run script:
cd ./recall/entity_typing/; sh run_{0, 1, 2}.sh DATARun script:
cd ./recall/entity_typing/; sh run_infer.sh DATA MODEL_PATH INFER_OUTPUTRun script:
cd ./recall/candidate/; sh get_valid_candidate.sh DATA_PATH SAVA_FILE E2R_SCORES_FILERun script:
cd ./recall/candidate/; sh get_test_candidate.sh DATA_PATH SAVA_FILE E2R_SCORES_FILEIt can be downloaded from this google drive.
We retrieve potential tail entities in faiss using text embeddings, run script:
cd ./recall/faiss_retrieval/; sh run.shRun script:
cd ensemble; python recall_model_ensemble.pyWe used 6 models in the ranking stage.
Run the training script:
cd ranking/wikikg90m-v2-pie; python -u ./train_transe1.py DATA_PATH SAVE_PATHRun the inference script:
cd ranking/wikikg90m-v2-pie; python -u ./infer_transe1.py DATA_PATH SAVE_PATH VAL_CANDIDATE_PATH TEST_CANDIDATE_PATH CHECKPOINTRun the training script:
cd ranking/wikikg90m-v2-pie; python -u ./train_transe2.py DATA_PATH SAVE_PATHRun the inference script:
cd ranking/wikikg90m-v2-pie; python -u ./infer_transe2.py DATA_PATH SAVE_PATH VAL_CANDIDATE_PATH TEST_CANDIDATE_PATH CHECKPOINTRun the training script:
cd ranking/wikikg90m-v2-pie; python -u ./train_complex.py DATA_PATH SAVE_PATHRun the inference script:
cd ranking/wikikg90m-v2-pie; python -u ./infer_complex.py DATA_PATH SAVE_PATH VAL_CANDIDATE_PATH TEST_CANDIDATE_PATH CHECKPOINTRun the training script:
cd ranking/wikikg90m-v2-pie; python -u ./train_transe_concatv1.py DATA_PATH SAVE_PATHRun the inference script:
cd ranking/wikikg90m-v2-pie; python -u ./infer_transe_concatv1.py DATA_PATH SAVE_PATH VAL_CANDIDATE_PATH TEST_CANDIDATE_PATH CHECKPOINTRun the training script:
cd ranking/wikikg90m-v2-ote; sh ./train_scripts/run_ote_lrd5k.sh DATA_PATHRun the inference script:
cd ranking/wikikg90m-v2-ote; python infer_all.py --model_path INIT_PATH --data_path DATA_PATHRun the training script:
cd ranking/wikikg90m-v2-ote; sh ./train_scripts/run_ote20_neg1200.sh DATA_PATHRun the inference script:
cd ranking/wikikg90m-v2-ote; python infer_all.py --model_path INIT_PATH --data_path DATA_PATH- Modify the variable
cur_model_pathinrank_model_ensemble.py. - Run script
python rank_model_ensemble.py valid_candidate_path valid_correct_t_path test_candidate_path output_path
Run script:
cd ensemble; python get_test_chl_submission.py t_pred_top10_file_path