|
| 1 | +# Contributing |
| 2 | + |
| 3 | +Thanks for contributing. |
| 4 | + |
| 5 | +This repository is maintained as a compact learning and engineering demo, so the contribution bar is simple: |
| 6 | +- keep changes focused |
| 7 | +- prefer reproducible examples over broad claims |
| 8 | +- avoid adding heavy dependencies without a clear need |
| 9 | +- preserve the repo's positioning as a GPU quant modeling demo, not a production trading system |
| 10 | + |
| 11 | +## Development Setup |
| 12 | + |
| 13 | +```bash |
| 14 | +python3 -m venv .venv |
| 15 | +source .venv/bin/activate |
| 16 | +python3 -m pip install -U pip |
| 17 | +python3 -m pip install -e '.[viz]' |
| 18 | +``` |
| 19 | + |
| 20 | +Optional extras: |
| 21 | + |
| 22 | +```bash |
| 23 | +python3 -m pip install -e '.[profiling]' |
| 24 | +python3 -m pip install -e '.[qlib]' |
| 25 | +python3 -m pip install -e '.[triton]' |
| 26 | +``` |
| 27 | + |
| 28 | +## Before Opening a PR |
| 29 | + |
| 30 | +Please run the smallest relevant checks locally. |
| 31 | + |
| 32 | +Minimum smoke path: |
| 33 | + |
| 34 | +```bash |
| 35 | +python3 -m qlib_gpu_model.train \ |
| 36 | + --data-source synthetic \ |
| 37 | + --device cpu \ |
| 38 | + --seq-len 16 \ |
| 39 | + --num-features 8 \ |
| 40 | + --model-dim 32 \ |
| 41 | + --num-heads 4 \ |
| 42 | + --num-layers 1 \ |
| 43 | + --ff-dim 64 \ |
| 44 | + --batch-size 32 \ |
| 45 | + --epochs 1 \ |
| 46 | + --num-workers 0 \ |
| 47 | + --amp-dtype fp32 \ |
| 48 | + --use-compile false \ |
| 49 | + --out-dir outputs/contrib_smoke |
| 50 | + |
| 51 | +python3 -m qlib_gpu_model.infer \ |
| 52 | + --checkpoint outputs/contrib_smoke/best.pt \ |
| 53 | + --device cpu \ |
| 54 | + --batch-size 16 \ |
| 55 | + --iters 10 \ |
| 56 | + --warmup 2 |
| 57 | +``` |
| 58 | + |
| 59 | +If you touch parquet evaluation logic, also run: |
| 60 | + |
| 61 | +```bash |
| 62 | +python3 -m compileall src |
| 63 | +``` |
| 64 | + |
| 65 | +## Scope Guidelines |
| 66 | + |
| 67 | +Good fits: |
| 68 | +- training or inference performance improvements |
| 69 | +- data pipeline fixes |
| 70 | +- backtest and walk-forward correctness fixes |
| 71 | +- reproducibility improvements |
| 72 | +- documentation and figure generation improvements |
| 73 | + |
| 74 | +Needs stronger justification: |
| 75 | +- new modeling stacks unrelated to the current pipeline |
| 76 | +- large framework migrations |
| 77 | +- features that imply live trading readiness |
| 78 | + |
| 79 | +## Pull Request Notes |
| 80 | + |
| 81 | +In your PR description, include: |
| 82 | +- what changed |
| 83 | +- why it changed |
| 84 | +- how you validated it |
| 85 | +- any metric impact if performance behavior changed |
0 commit comments