目录
hydrogenhy14小时前2次提交

Jittor Warmup1 Cora GCN

This repository contains the open-source code for the Jittor competition warmup task: node classification on Cora with a two-layer GCN and optional label propagation post-processing.

Environment

Recommended environment:

  • Python 3.8+
  • Jittor
  • JittorGeometric
  • NumPy

Install dependencies:

pip install -r requirements.txt

If JittorGeometric requires extra system or CUDA configuration, follow the official installation guide: https://github.com/AlgRUC/JittorGeometric#installation

Data

Download the official competition dataset and put it at:

data/cora.pkl

The repository does not include the raw dataset file. You can also place the dataset elsewhere and pass the directory with --data-root:

python -m src.cora_gcn --data-root /path/to/data

Expected dataset fields are documented in data/README.md.

Training

Run the default training and prediction pipeline:

python -m src.cora_gcn --config configs/default.json

Equivalent helper script:

bash scripts/train_and_predict.sh

The default run writes:

  • outputs/default/config.json: actual config used by the run
  • outputs/default/command.txt: command used to launch the run
  • outputs/default/train.log: training and validation log
  • outputs/default/result.json: prediction file for test nodes

Common overrides:

python -m src.cora_gcn \
  --config configs/default.json \
  --data-root data \
  --output-dir outputs/seed42 \
  --seed 42 \
  --hidden-dim 128 \
  --dropout 0.6

Command-line arguments have higher priority than config values.

Evaluation / Inference

The warmup task does not require a separate checkpoint-based inference step. The command above trains the model, selects the best validation epoch, applies label propagation when it improves validation accuracy, and writes result.json.

To package the result:

python scripts/package_submission.py \
  --result-path outputs/default/result.json \
  --zip-path outputs/result.zip

Result

Metric: node classification accuracy on the validation split during local development. The final online score may differ because labels for the test split are hidden by the competition platform.

Default model:

  • 2-layer GCN
  • hidden dimension: 128
  • dropout: 0.6
  • Adam learning rate: 0.01
  • weight decay: 0.001
  • early stopping by validation accuracy
  • label propagation post-processing selected by validation accuracy

Reproducibility

Use --seed or the seed field in configs/default.json. The script sets Python, NumPy, and Jittor seeds before loading data and training.

If files are missing, the script reports the expected path and suggests using --data-root.

Third-party Dependencies

This project uses Jittor and JittorGeometric APIs, including GCNConv, gcn_norm, cootocsc, and cootocsr. Please follow their respective licenses when redistributing this code or building upon it.

关于

第六届计图人工智能挑战赛,hydrogen战队,warmup1开原仓库

35.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802047560号