From raw interactions to reliable experiments, evaluation, and insight.
UniKT brings data preparation, training, hyperparameter search, evaluation, efficiency benchmarking, and case analysis into one consistent workflow. Its extensible design lets researchers incorporate new models, data sources, and experiment configurations without disrupting established workflows.
- Reproducible by default — Pixi environments, a committed lockfile, archived run configurations, and deterministic execution where supported.
- One workflow, end to end — download and process data, run cross-validation, track metrics, evaluate checkpoints, and inspect predictions.
- Built for research — Optuna search, SwanLab integration, efficiency benchmarks, and prediction-level case analysis are included.
- Easy to extend — add a trainer, configuration, or data source through the framework registry without changing the entry points.
git clone https://github.com/szhhwh/UniKT.git
cd UniKT
pixi installThe default environment uses CUDA 12.8 · Python 3.12 · PyTorch 2.10. Enter it with pixi shell, or run each command through pixi run as shown below.
Need another environment?
pixi shell -e cpu # CPU-only
pixi shell -e mamba # Mamba-based models
pixi shell -e xlstm # xLSTM-based models
pixi shell -e dhg-gpu # DHG-based models on CUDA 11.7
pixi shell -e dhg-cpu # DHG-based models on CPUpixi run python data_process.py download -d assistments09
pixi run python data_process.py process -d assistments09Built-in processors cover ASSISTments, EdNet-KT1, Junyi 2015, KDD Cup 2010, MOOC-Radar, NIPS 2020, Practice Anatomy, Slepemapy, and XES3G5M. Check the active options with pixi run python data_process.py download --help.
# Train one validation fold.
pixi run python train.py -m GIKT -d assistments09 --fold 0
# Train several folds with the included helper.
PYTHON="pixi run python" bash scripts/run_kfold.sh GIKT "0 1 2 3 4" -d assistments09Each experiment is saved under runs/ with its resolved configuration, checkpoints, and metrics.
| Task | Command |
|---|---|
| Train a model | pixi run python train.py -m <model> -d <dataset> |
| Search hyperparameters | pixi run python optuna_search.py -m <model> -d <dataset> |
| Evaluate a saved run | pixi run python evaluate.py --run_dir runs/normal/<run_id> |
| Benchmark efficiency | pixi run python efficiency.py -m <model> -d <dataset> |
| Inspect model predictions | pixi run python case_analysis.py inference --run_dir runs/normal/<run_id> |
Tip
Every command exposes its current, code-generated reference through --help. For model-specific options, run pixi run python train.py -m <model> --help.
Metrics are always written locally. SwanLab tracking is enabled by default; sign in once before logging runs to the service:
pixi run swanlab loginFor a local-only run, pass --general.swanlab false. Optional SWANLAB_WORKSPACE, SWANLAB_MODE, and LARK_WEBHOOK_URL settings belong in .env.
Launch, monitor, and manage experiments in a browser with the optional web interface.
pixi install -e web
cd web/frontend && npm install && cd ../..
pixi run web-serveOpen localhost:5173, then see the web manager guide for development details.
UniKT builds upon the excellent work of pyKT, which provided valuable references for several knowledge-tracing implementations.
Released under the MIT License.