-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (53 loc) · 1.82 KB
/
Copy pathci.yml
File metadata and controls
66 lines (53 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: ci
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-typecheck-test:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.5.4"
- name: Install dependencies
run: uv sync --extra dev --frozen
- name: Ruff lint
run: uv run ruff check .
- name: Ruff format check
run: uv run ruff format --check .
- name: Mypy strict
run: uv run mypy src tests scripts
- name: Pytest (unit)
run: uv run pytest -v --cov=src --cov-report=term-missing
- name: Cache bge-m3 weights
uses: actions/cache@v4
with:
path: ~/.cache/huggingface
key: hf-bge-m3
- name: Eval regression gate (CPU page-level text retrieval)
# Runs the hybrid text retriever (bge-m3 on CPU + BM25 + RRF) over the
# committed rag_corpus snapshot and gates page-level retrieval metrics
# against data/eval/baseline_retrieval.json at a 5% threshold. The visual
# (GPU) and generation/judge (API) legs run in the manual/scheduled full
# eval, not here — see docs/evals.md "Regression gate".
run: |
uv run python -m scripts.eval_retrieval_ci \
--output data/eval/runs/retrieval-ci.json
uv run python -m scripts.check_regression \
--baseline data/eval/baseline_retrieval.json \
--candidate data/eval/runs/retrieval-ci.json \
--metrics ndcg_at_5 recall_at_10 mrr \
--threshold 0.05