-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (49 loc) · 1.65 KB
/
Copy pathbenchmarks.yml
File metadata and controls
57 lines (49 loc) · 1.65 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
name: Performance Benchmarking
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
benchmark:
name: Seeded Drift Research Benchmark
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Run deterministic benchmark
run: |
python benchmarks/run_benchmark.py \
--iterations 20000 \
--evaluation-samples 2000 \
--output benchmark-results.json
- name: Validate benchmark schema
run: |
python - <<'PY'
import json
from pathlib import Path
result = json.loads(Path("benchmark-results.json").read_text())
required = {"latency_us", "throughput_ops_s", "peak_tracemalloc_mib", "quality"}
missing = required - result.keys()
if missing:
raise SystemExit(f"missing benchmark fields: {sorted(missing)}")
if result["throughput_ops_s"] <= 0 or result["latency_us"]["p99"] <= 0:
raise SystemExit("benchmark produced invalid performance metrics")
if result["quality"]["f1"] < 0.95:
raise SystemExit("synthetic drift regression: F1 below 0.95")
PY
- name: Upload raw benchmark evidence
uses: actions/upload-artifact@v4
with:
name: sentinelai-benchmark-${{ github.sha }}
path: benchmark-results.json
if-no-files-found: error
retention-days: 30