https://github.com/ralgond/codes-for-caai-bdsc2023-cup-1st-place-solution
CAAI BDSC2023 CUP 任务1《社交图谱小样本场景链接预测》,初复赛第一名的代码,主要思路基于知识图谱
https://github.com/ralgond/codes-for-caai-bdsc2023-cup-1st-place-solution
knowledge-graph-completion link-prediction pytorch tianchi tianchi-competition
Last synced: 7 months ago
JSON representation
CAAI BDSC2023 CUP 任务1《社交图谱小样本场景链接预测》,初复赛第一名的代码,主要思路基于知识图谱
- Host: GitHub
- URL: https://github.com/ralgond/codes-for-caai-bdsc2023-cup-1st-place-solution
- Owner: ralgond
- License: apache-2.0
- Created: 2023-06-26T11:32:27.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-27T09:38:46.000Z (about 1 year ago)
- Last Synced: 2025-04-05T00:41:17.169Z (8 months ago)
- Topics: knowledge-graph-completion, link-prediction, pytorch, tianchi, tianchi-competition
- Language: Python
- Homepage:
- Size: 1010 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## 项目介绍
https://tianchi.aliyun.com/competition/entrance/532073
## 汇报PPT
https://github.com/ralgond/Codes-for-CAAI-BDSC2023-CUP-1st-place-solution/blob/main/BDSC2023.pptx
解题思路是基于知识图谱中的链接预测技术。
## 软硬件环境
PyTorch 1.11.0
Python 3.8(ubuntu20.04)
Cuda 11.3
RTX 3090(24GB) * 1
## 部署与运行
### 部署
```
unzip AREA.zip
cd AREA
pip install -r requirements.txt
mkdir -p ./src/raw_data/ecom-social/
mkdir -p ./src/data/ecom-social/
mkdir -p ./src/save/ecom-social/
```
将初赛和复赛的文件都放到 ./src/raw_data/ecom-social/
这些文件如下:
```
event_info.json
source_event_preliminary_train_info.json
target_event_final_test_info.json
target_event_final_train_info.json
target_event_preliminary_test_info.json
target_event_preliminary_train_info.json
user_info.json
```
### 运行代码:
```
cd src
python process_data2.py
bash run.sh
# 程序大概会运行 2.5 个小时...
cd ..
```
### 程序运行结束
结果文件会保存在 ./submit/, 文件名为submit.json
## 关于结果的随机性
结果会在一定范围里波动,请一直执行run.sh,直到复现最优成绩即可。