-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (63 loc) · 2.13 KB
/
Copy patheval.yml
File metadata and controls
71 lines (63 loc) · 2.13 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
67
68
69
70
71
name: Golden Eval
on:
schedule:
- cron: "0 15 * * 1"
workflow_dispatch:
permissions:
contents: read
issues: write
jobs:
golden-eval:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10.32.1
- uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm eval
- name: Open issue on accuracy regression
env:
GH_TOKEN: ${{ github.token }}
run: |
node <<'NODE'
const fs = require('node:fs');
const path = require('node:path');
const dir = 'eval-results';
const latest = fs.readdirSync(dir)
.filter((file) => file.endsWith('.json'))
.sort()
.at(-1);
if (!latest) throw new Error('No eval report generated');
const report = JSON.parse(fs.readFileSync(path.join(dir, latest), 'utf8'));
const accuracy = report.metrics.exactTierAccuracy;
const threshold = 0.95;
if (accuracy >= threshold) process.exit(0);
fs.writeFileSync(
'eval-regression.md',
[
'Golden-set eval accuracy dropped below the 95% threshold.',
'',
`Report: ${latest}`,
`Accuracy: ${(accuracy * 100).toFixed(1)}%`,
`Candidates: ${report.metrics.candidateCount}`,
`Hallucination rate: ${(report.metrics.hallucinationRate * 100).toFixed(1)}%`,
`Cost: $${report.metrics.totalCostUsd.toFixed(4)}`,
'',
'Review the generated eval report in the workflow artifacts/logs and compare against the previous weekly run.',
].join('\n'),
);
NODE
- name: Create regression issue
if: ${{ hashFiles('eval-regression.md') != '' }}
env:
GH_TOKEN: ${{ github.token }}
run: |
gh issue create \
--title "Golden eval accuracy regression" \
--body-file eval-regression.md \
--label "tech-debt"