📖 About • 📦 Installation • 🚀 Quick Start • 🛠 Development • 🛣 Roadmap
Mini-Judge is a lightweight, high-performance online judge system for evaluating code solutions, supporting multiple programming languages and evaluation modes.
Warning
Simple and naive implementation, without security guarantees.
option 1: conda
conda create -n judge python=3.11 -y
conda activate judge
pip install -r requirements.txt
pip install -e .
option 2: uv
uv venv --python 3.11
source .venv/bin/activate
uv pip install -r requirements.txt
uv pip install -e .
Note
uv is a fast Python package installer and resolver.
install redis
sudo apt update && sudo apt install redis-server -y
redis-server --daemonize yes
uvicorn app.main:app --reload
# warm up
python scripts/warmup.py
# check health
curl http://localhost:8000/api/v1/health
# check detail status
curl http://localhost:8000/api/v1/health/detail
# check restart status
curl http://localhost:8000/api/v1/health/restart
# kill all judge processes
ps aux | grep -v grep | grep 'judge' | awk '{print $2}' | xargs kill -9
pytest tests/test_judge.py -v -s
# ACM Mode
python scripts/taco.py --source codeforces --samples 8192
# large samples for full dataset
# Full Mode
python scripts/leetcode.py --samples 8192
Stress test results are available here.
Warning
C/C++ is not supported yet.
Please refer to the Tutorial and scripts for more details.
For multi-node deployment add RL training, please refer to the multi-node.
Important
We recommend turn on the security check while RL training.
Note
We use Ruff as our Python linter and formatter.
# Auto-fix issues
ruff check --fix .
# Format code
ruff format .
Note
Pre-commit hooks automatically check your code before committing.
# Installation
pre-commit install
# Run all checks manually
pre-commit run --all-files
- high concurrency (maybe)
- support ACM Mode
- support LeetCode Mode (deprecated)
- support FullCode Mode
- organize the doc
- reimplement LeetCode Mode
This project is licensed under the MIT License - see the LICENSE file for details.