Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
new_boy 97c01adbe9 | 1 year ago | |
---|---|---|
.. | ||
1.pth | 1 year ago | |
README.md | 1 year ago | |
format_pyg.py | 1 year ago | |
icdm2022_session1_test_ids.txt | 1 year ago | |
pyg_demo.sh | 1 year ago | |
rgcn_sage_icdm.py | 1 year ago | |
run.py | 1 year ago |
pyg_demo.sh
: Shell Script (include converting raw data into PyG graph, training model and generating final result)rgcn_mb_icdm.py
: PyG rgcn modelformat_pyg.py
: PyG data generatorbest_model/
: Directory to store model trainedmkdir -p /dataset/pyg_data/
cd /code/icdm_graph_competition/pyg_example/
sh pyg_demo.sh
Output
PyG Graph is stored in /dataset/pyg_data/
icdm2022_session1.pt
PyG Heterograph of session1 data
icdm2022_session2.pt
PyG Heterograph of session2 data
*.nodes.pyg
Temporary cache file (Removable)
Trained Model is saved in /code/icdm_graph_competition/best_model/
1.pth
Model filemodel_id
to customize name of model fileFinal result of Inference is generated in /code/icdm_graph_competition/pyg_example/
pyg_session1.json
Result of session1pyg_session2.json
Result of session2利用启智OpenI平台跑通pyg_example的个人实践,毕竟挺好的平台,不用太可惜(羊毛薅起来!)。但是中间还是比较波折,故把个人实践分享给大家。
生成训练数据 - pt文件
方式一(成功):下载比赛中的节点、边、embedding数据到本地,利用本地机器跑一下,运存大45G吧差不多。生成大概15g的pt文件,压缩后5g。我的命名是cdm2022_session1.zip。然后将其上传到云脑旁边有个数据集选项里面。
方式二(失败,运行成功,但是输出没pt文件):利用平台-云脑-训练任务-新建训练任务,将节点、边、embedding数据集挂载一下,修改输出文件路径。
这个过程是将节点、边啥的转化成图,然后存下来pt,作为训练集合,我在这块卡的时间挺长的。。。
训练模型 - pth文件
首先,修改一下openi项目中的
然后,新建一个训练任务
最后,下载模型,点进训练任务的结果下载中,下载 .pth 模型文件,大概4M 。
预测结果
首先将模型 .pth 和测试数据 icdm2022_session1_test_ids.txt 上传到项目代码的master分支中icdm_graph_competition/pyg_example下
然后修改gcn_sage_icdm.py中模型加载路径,
最后新建一个调试任务
icdm_sesison1_dir="/dataset/"
# icdm_sesison2_dir="/tmp/dataset/"
ouput_result_dir=""
pyg_data_session1="/dataset/icdm2022_session1"
# pyg_data_session2="/dataset/pyg_data/icdm2022_session2"
test_ids_session1="/code/pyg_example/icdm2022_session1_test_ids.txt"
python rgcn_sage_icdm.py --dataset $pyg_data_session1".pt" \
--test-file $test_ids_session1 \
--json-file $ouput_result_dir"pyg_pred_session1.json" \
--batch-size $batch_size \
--n-layers $num_layers \
--fanout $fanout \
--inference True \
--model-id $model_id \
--device-id 0
sh pyg_demo.sh
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》