Skip to content

Commit 56653e4

Browse files
committed
Add contribution and issue templates
1 parent a0b9851 commit 56653e4

6 files changed

Lines changed: 201 additions & 0 deletions

File tree

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Bug report
2+
description: Report a reproducible bug in training, inference, data handling, or evaluation.
3+
title: "[Bug] "
4+
labels: ["bug"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Please include a minimal reproduction and the exact command you ran.
10+
- type: textarea
11+
id: summary
12+
attributes:
13+
label: Summary
14+
description: What happened?
15+
placeholder: A concise description of the bug.
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: reproduce
20+
attributes:
21+
label: Reproduction
22+
description: Paste the command, inputs, and steps needed to reproduce.
23+
placeholder: |
24+
1. Create environment...
25+
2. Run command...
26+
3. Observe failure...
27+
validations:
28+
required: true
29+
- type: textarea
30+
id: expected
31+
attributes:
32+
label: Expected behavior
33+
description: What did you expect instead?
34+
validations:
35+
required: true
36+
- type: textarea
37+
id: logs
38+
attributes:
39+
label: Logs or traceback
40+
description: Paste the relevant output.
41+
render: shell
42+
- type: input
43+
id: environment
44+
attributes:
45+
label: Environment
46+
description: Python version, torch version, and device type.
47+
placeholder: "Python 3.11, torch 2.3+, cpu/cuda/mps"
48+
validations:
49+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Security issue
4+
about: Report security problems privately instead of opening a public issue.
5+
url: https://github.com/LLAA178/qlib-gpu-model/security
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Feature request
2+
description: Suggest an improvement that fits the repo's scope.
3+
title: "[Feature] "
4+
labels: ["enhancement"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
This repository is intentionally small. Please explain why the change fits a GPU quant modeling demo.
10+
- type: textarea
11+
id: problem
12+
attributes:
13+
label: Problem
14+
description: What limitation or pain point are you trying to solve?
15+
validations:
16+
required: true
17+
- type: textarea
18+
id: proposal
19+
attributes:
20+
label: Proposed change
21+
description: Describe the smallest useful version of the feature.
22+
validations:
23+
required: true
24+
- type: textarea
25+
id: alternatives
26+
attributes:
27+
label: Alternatives considered
28+
description: What other approaches did you consider?
29+
- type: textarea
30+
id: validation
31+
attributes:
32+
label: Validation plan
33+
description: How would this be tested or measured?

.github/pull_request_template.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Summary
2+
3+
- what changed
4+
- why it changed
5+
6+
## Validation
7+
8+
- commands run:
9+
- datasets or checkpoints used:
10+
- metric or behavior impact:
11+
12+
## Checklist
13+
14+
- [ ] change is scoped and relevant to this repo
15+
- [ ] local smoke path was run when applicable
16+
- [ ] README or comments were updated if behavior changed
17+
- [ ] no claim of production trading readiness was introduced

CONTRIBUTING.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
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

SECURITY.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Security Policy
2+
3+
This repository is a learning-oriented quant modeling demo and is not intended for production trading deployment.
4+
5+
If you find a security issue, do not open a public issue with exploit details.
6+
Please report it privately through GitHub security reporting if available, or contact the repository owner directly.
7+
8+
When reporting, include:
9+
- affected file or component
10+
- impact
11+
- reproduction steps
12+
- any suggested mitigation

0 commit comments

Comments
 (0)