Skip to content

Commit e417cf4

Browse files
Jammy2211Jammy2211
authored andcommitted
mind: complete test-mode-rep-samples phase 1 (design; PyAutoFit#1378 closed)
1 parent a02d72f commit e417cf4

4 files changed

Lines changed: 52 additions & 52 deletions

File tree

active.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
# Active Tasks
22

33

4-
## test-mode-representative-samples-phase-1-design
5-
- issue: https://github.com/PyAutoLabs/PyAutoFit/issues/1378
6-
- session: claude --resume fceb9fd4-59ed-4cb4-acc0-bd4c04c23839
7-
- status: library-dev (design-only phase — no source edits, no worktree; claims NO repos)
8-
- worktree: none (phase 2 creates ~/Code/PyAutoLabs-wt/test-mode-representative-samples)
9-
- autonomy: supervised
10-
- prompt: active/test_mode_representative_outputs_size_realistic_phase_1_design.md
11-
- note: phase 1/4 of the test-mode size-realistic-samples umbrella (draft/feature/autofit/test_mode_representative_outputs_size_realistic.md). DESIGN COMPLETE 2026-07-16 — D1-D4 posted (#1378 comment): knob PYAUTO_TEST_MODE_SAMPLES default 4 / accessor in autoconf via existing autofit shim / N==4 literal branch untouched / N>4 vectorized numpy -> production Sample.from_lists path / weights exp(-i/(N/10)) w_min>=4.5e-10 at N<=1e5 (threshold 1e-10; bypass write path never prunes — updater.py only). Production parity target measured: 10,187 rows x 21 cols = 9.07 MB (hst_fast source_lp[1]). Awaiting human validation of D1-D4, then close #1378 + issue phase 2 once aggregator-sqlite's PyAutoFit claim frees (#1376 awaiting merge).
12-
- repos:
13-
144
## aggregator-sqlite
155
- issue: https://github.com/PyAutoLabs/PyAutoFit/issues/1377
166
- session: claude --resume aa483bab-3f5b-4ffe-b121-c968ff80ffae

active/test_mode_representative_outputs_size_realistic_phase_1_design.md

Lines changed: 0 additions & 41 deletions
This file was deleted.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
## test-mode-representative-samples-phase-1-design
2+
- issue: https://github.com/PyAutoLabs/PyAutoFit/issues/1378 (CLOSED)
3+
- completed: 2026-07-16
4+
- epic: test_mode_representative_outputs_size_realistic phase 1/4 (umbrella in draft/feature/autofit/; phases 2-4 filed alongside)
5+
- repos: PyAutoFit, PyAutoConf (design-only — no source edits, no PRs, no worktree)
6+
- notes: D1-D4 locked on #1378 for phase 2 to implement verbatim. D1: PYAUTO_TEST_MODE_SAMPLES env var, default 4, N<4 raises; accessor in autoconf/test_mode.py re-exported via the existing autofit/non_linear/test_mode.py shim — PyAutoConf IS in scope, its PR merges first. D2: N==4 keeps today's literal branch byte-identical; N>4 = vectorized numpy synthesis (rng seed 0, prior-median row 0, logL_i = best - i best-first, weights ∝ exp(-i/(N/10)) normalized) fed into the SAME production path Nautilus uses (arrays → .tolist() → Sample.from_lists → SamplesPDF → write_table), so CSV layout/byte size representative by construction. Parity target measured from slam-resume-profiling: source_lp[1] = 10,187 rows × 21 cols = 9.07 MB (~890 B/row). KEY FIND: samples_above_weight_threshold_from pruning is ONLY called from updater.py (real-run perform_update) — the bypass write path never prunes; the exp weight profile keeps w_min ≈ (10/N)e^-10 ≥ 4.5e-10 > threshold 1e-10 for N ≤ 1e5 so later threshold-applying loads are safe too (cf. #1375 2-sample pruning incident). D3: 7-item numpy-only phase-2 test list (exact 4-sample back-compat, summary/chaining, save-load round trip, aggregator+database at N=1000, functional N=50k without hard timing asserts, ValueError at N=3). D4 recorded-not-solved: no search_internal checkpoint, adapt-image FITS prior-median values, latents auto-skipped, log_evidence stubbed — timing-honest not science-honest. Side benefit: non-degenerate covariance.csv at N>4 (today's 4 near-collinear samples are borderline singular). SEQUENCING: phase 2 blocked by aggregator-sqlite's PyAutoFit claim (#1377 in flight; #1376 merged 2026-07-16 14:14 but the Phase D follow-on holds the worktree).
7+
8+
## Original prompt
9+
10+
# Test-mode representative outputs — Phase 1: design
11+
12+
Type: feature
13+
Target: autofit
14+
Repos:
15+
- PyAutoFit
16+
- PyAutoConf
17+
Difficulty: small
18+
Autonomy: supervised
19+
Priority: normal
20+
Status: formalised
21+
22+
Phase 1 of 4 of `draft/feature/autofit/test_mode_representative_outputs_size_realistic.md`
23+
(the parent umbrella — read it first; its scoping notes were verified against source
24+
2026-07-16). Design only — **no source edits**; the deliverable is a set of locked
25+
decisions recorded on this phase's GitHub issue, which phase 2 implements verbatim.
26+
27+
## Decisions to lock
28+
29+
- **D1 — knob.** Confirm `PYAUTO_TEST_MODE_SAMPLES=N` (env var, default 4 = today's
30+
behaviour, so nothing changes for existing users/tests) and where it is read:
31+
accessor next to `test_mode_level()` in @PyAutoConf `autoconf/test_mode.py` vs
32+
reading it locally in @PyAutoFit. Decide whether PyAutoConf is touched at all.
33+
- **D2 — synthesis scheme.** Exact vectorized recipe `_build_fake_samples` uses at
34+
large N: parameter scatter around the prior median (deterministic seed — where does
35+
the seed live?), monotone plausible log-likelihoods, valid normalized weights, and
36+
the samples.csv column layout/dtypes so row count *and byte size* match a production
37+
Nautilus SLaM stage (N ~ 10k–100k).
38+
- **D3 — downstream contract.** Enumerate what must keep working on the synthetic set
39+
and how phase 2 tests each: `samples.summary()` quantiles, search chaining
40+
(`result.model` / `result.instance`), aggregator scrape, database load, and the
41+
existing 4-sample multi-batch structural guarantees at large N.
42+
- **D4 — representativeness limits.** Record (not solve) the known deltas from a
43+
production resume: single bypass likelihood call leaves no realistically-sized
44+
search-internal state; adapt-image FITS values come from the prior-median model
45+
(size right, values wrong); test mode auto-skips latents.
46+
47+
## Exit criteria
48+
49+
D1–D4 posted on the issue as locked decisions; phase 2 unblocked with no open design
50+
questions.

complete/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Token-light navigation over the finished-work records (schema:
66
only then grep a dated bucket. Curators: edit the band between the CURATED
77
markers; everything below GENERATED is rebuilt.
88

9-
615 records across 5 buckets.
9+
616 records across 5 buckets.
1010

1111
<!-- CURATED:START -->
1212
## Highlights
@@ -221,6 +221,7 @@ _(curate hard-won records here — survives regeneration.)_
221221
- [stpsf-tier2b](2026/07/stpsf-tier2b.md) — JWST per-frame PSF coverage lifted 3/6 -> 6/6 (F115W validated) — STPSF tier-2b at frame DETECTOR + target pos…
222222
- [stub-skill-recipes-fill-in](2026/07/stub-skill-recipes-fill-in.md) — retired by user decision
223223
- [survey-cutouts](2026/07/survey-cutouts.md)
224+
- [test-mode-representative-samples-phase-1-design](2026/07/test-mode-representative-samples-phase-1-design.md)
224225
- [user-defaults-discovery](2026/07/user-defaults-discovery.md) — batch finale (task 6, rescoped discovery-half) — start-new-project step 0 environment-discovery preflight: rea…
225226
- [verify-install-check-f-autosimulate-and-dep-pin](2026/07/verify-install-check-f-autosimulate-and-dep-pin.md)
226227
- [version-check-compat-floor](2026/07/version-check-compat-floor.md)

0 commit comments

Comments
 (0)