-
Notifications
You must be signed in to change notification settings - Fork 1
277 lines (269 loc) · 10.3 KB
/
Copy pathci.yml
File metadata and controls
277 lines (269 loc) · 10.3 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
name: CI
on:
push:
pull_request:
jobs:
quality:
name: quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install package and tooling
run: |
python -m pip install --upgrade pip
python -m pip install --no-cache-dir -e .
python -m pip install ruff pytest
- name: Compile source and tests
run: python -m compileall -q src tests
- name: Ruff
run: ruff check src tests
- name: Reject WWPGD dependency pins and hard-coded required SHAs
shell: bash
run: |
! grep -R "WW_PGD.git""@" pyproject.toml .github scripts src tests docs README.md
! rg 'required.{0,40}[0-9a-f]{40}|[0-9a-f]{40}.{0,40}required' pyproject.toml .github scripts src tests docs README.md
git diff --check
tests:
name: complete portable test suite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install package and tooling
run: |
python -m pip install --upgrade pip
python -m pip install -e . pytest
- name: Run complete portable test suite
shell: bash
run: |
set -o pipefail
mkdir -p artifacts/test-logs
pytest -q -ra --tb=short 2>&1 | tee artifacts/test-logs/pytest.log
- name: Upload pytest log
if: always()
uses: actions/upload-artifact@v4
with:
name: pytest-log
path: artifacts/test-logs/pytest.log
if-no-files-found: error
level0-2-local-runtime:
name: Level 0-2 local runtime acceptance
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install package and tooling
run: |
python -m pip install --upgrade pip
python -m pip install --no-cache-dir -e . pytest
- name: Run real pip-package readiness for Levels 0-2
run: |
wwgpt local-readiness \
--device cpu \
--levels 0,1,2 \
--optimizers adamw \
--output artifacts/local-readiness
- name: Run bounded Level 0-2 training and post-processing acceptance
env:
MPLBACKEND: Agg
run: |
pytest -q \
tests/test_acceleration_analysis.py \
tests/test_cached_controller_csv_routing.py \
tests/test_cached_endpoint_relaxation.py \
tests/test_level012_cached_end_to_end.py \
tests/test_level012_full_pipeline.py \
tests/test_overtraining_mode.py \
tests/test_local_level_scripts.py \
tests/test_pass6_resume_analysis_cli_ci.py \
tests/test_release_readiness_audit.py \
tests/test_source_structure.py
- name: Run clean-process Level 0-2 shell acceptance
env:
MPLBACKEND: Agg
run: |
./scripts/run_bounded_level012_acceptance.sh \
artifacts/bounded-level012-release
- name: Upload local readiness report
if: always()
uses: actions/upload-artifact@v4
with:
name: level0-2-local-readiness
path: artifacts/local-readiness/**
if-no-files-found: error
macos-python310-release-acceptance:
name: macOS Python 3.10 / NumPy 1.x release acceptance
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install constrained scientific stack and package
shell: bash
run: |
set -euo pipefail
python -m pip install --upgrade pip
printf 'numpy<2\npandas<2\n' > /tmp/wwgpt-constraints.txt
python -m pip install --no-cache-dir \
-c /tmp/wwgpt-constraints.txt \
-e . pytest
- name: Run real package readiness on macOS
run: |
wwgpt local-readiness \
--device cpu \
--levels 0,1,2 \
--optimizers adamw \
--output artifacts/macos-local-readiness
- name: Run Python 3.10 and NumPy 1.x regressions
env:
MPLBACKEND: Agg
run: |
pytest -q \
tests/test_acceleration_analysis.py \
tests/test_level012_full_pipeline.py \
tests/test_overtraining_mode.py \
tests/test_pass6_resume_analysis_cli_ci.py \
tests/test_release_readiness_audit.py \
tests/test_source_structure.py
- name: Run clean-process Level 0-2 shell acceptance on macOS
env:
MPLBACKEND: Agg
run: |
./scripts/run_bounded_level012_acceptance.sh \
artifacts/macos-bounded-level012-release
- name: Upload macOS readiness and acceptance outputs
if: always()
uses: actions/upload-artifact@v4
with:
name: macos-python310-release-acceptance
path: |
artifacts/macos-local-readiness/**
artifacts/macos-bounded-level012-release/**
if-no-files-found: error
resolved-pilot-manifests:
name: resolved pilot manifests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install package
run: python -m pip install -e .
- name: Resolve and validate Level 0, 1, and 2 execution manifests
shell: bash
run: |
set -euo pipefail
mkdir -p artifacts/resolved-pilot-manifests
for level in 0 1 2; do
wwgpt run-multiseed \
--level "$level" \
--config "configs/level${level}_adaptive_alpha.yaml" \
--data-root /tmp/wwgpt-data \
--results-root /tmp/wwgpt-results \
--token-multiplier 20 \
--device cpu \
--dry-run \
| tail -n +2 > "artifacts/resolved-pilot-manifests/level${level}.json"
python -m json.tool "artifacts/resolved-pilot-manifests/level${level}.json" >/dev/null
done
wwgpt run-multiseed \
--level 0 \
--config configs/level0_overtraining_pilot.yaml \
--data-root /tmp/wwgpt-data \
--results-root /tmp/wwgpt-overtraining-results \
--token-multiplier 20 \
--device cpu \
--dry-run \
| tail -n +2 > artifacts/resolved-pilot-manifests/level0-overtraining.json
python - <<'PY'
import json
from pathlib import Path
expected = {
0: (25, 75, 0.02),
1: (250, 500, 0.002049),
2: (1000, 3000, 0.000511),
}
overtraining = json.loads(
Path(
"artifacts/resolved-pilot-manifests/level0-overtraining.json"
).read_text()
)
assert overtraining["nominal_optimizer_steps"] == 242
assert overtraining["resolved_optimizer_steps"] == 1000
assert overtraining["overtraining_active"] is True
assert overtraining["training_protocol"] == "fixed_corpus_overtraining"
assert overtraining["valid_for_scaling_law_fit"] is False
assert overtraining["optimizer_step_limit_source"] == "overtraining_max_steps"
for level, (interval, first_active, gain) in expected.items():
payload = json.loads(
Path(f"artifacts/resolved-pilot-manifests/level{level}.json").read_text()
)
schedule = payload["wwpgd_adaptive_schedule"]
assert payload["endpoint_measurement_interval"] == interval
assert payload["endpoint_measurement_source"] == "measurement.alpha_interval"
assert schedule["first_possible_active_endpoint_step"] == first_active
assert abs(schedule["effective_base_gain"] - gain) <= max(
1e-6, gain * 0.01
)
assert (
schedule["worst_case_endpoint_fraction_per_refresh"]
<= 0.40 + 1e-12
)
PY
- name: Upload resolved pilot execution manifests
uses: actions/upload-artifact@v4
with:
name: resolved-pilot-execution-manifests
path: artifacts/resolved-pilot-manifests/*.json
if-no-files-found: error
analysis-notebooks:
name: schema-v3 Papermill notebooks
runs-on: ubuntu-latest
env:
MPLBACKEND: Agg
WWGPT_RESULTS_ROOT: tests/fixtures/schema_v3_results/experiments/level_00/multiplier_1
WWGPT_NOTEBOOK_OUTPUT_DIR: artifacts/analysis-notebooks
WWGPT_ANALYSIS_PLAN: configs/analysis_plan_exploratory.yaml
WWGPT_LEVEL: '0'
WWGPT_TOKEN_MULTIPLIER: '1'
WWGPT_BASE_OPTIMIZER: adamw
WWGPT_NOTEBOOK_STRICT: '0'
WWGPT_RUN_ANALYSIS: '0'
WWGPT_REUSE_ANALYSIS: '1'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install package and notebook tooling
run: |
python -m pip install --upgrade pip
python -m pip install --no-cache-dir -e ".[notebooks]"
python -m pip install pytest
- name: Execute all schema-v3 analysis notebooks through Papermill
shell: bash
run: |
set -euo pipefail
./scripts/run_analysis_notebooks.sh
test "$(find "$WWGPT_NOTEBOOK_OUTPUT_DIR/executed" -name '*.ipynb' | wc -l)" -eq 7
test -f "$WWGPT_NOTEBOOK_OUTPUT_DIR/tables/repository_validation.csv"
test -f "$WWGPT_NOTEBOOK_OUTPUT_DIR/tables/selected_checkpoint_effects_by_seed.csv"
test -f "$WWGPT_NOTEBOOK_OUTPUT_DIR/tables/selected_checkpoint_effect_summary.csv"
test -f "$WWGPT_NOTEBOOK_OUTPUT_DIR/tables/cross_level_scaling_readiness.csv"
test -f "$WWGPT_NOTEBOOK_OUTPUT_DIR/tables/wwpgd_diagnostic_health.csv"
- name: Upload executed notebooks and analysis outputs
if: always()
uses: actions/upload-artifact@v4
with:
name: schema-v3-analysis-notebooks
path: artifacts/analysis-notebooks/**
if-no-files-found: error