diff options
| author | Void Agent <void@jayrup.hermes> | 2026-08-20 17:02:15 +0100 |
|---|---|---|
| committer | Void Agent <void@jayrup.hermes> | 2026-08-20 17:02:15 +0100 |
| commit | cf83937689bb30e2b5fa6e3efaa2f115016a030b (patch) | |
| tree | 85ea21ba4df097e7c6995e9bca035faf0236897f /tests/test_phase3_flags.py | |
| parent | f8995751de925571d4eec669ab7ab8b1c3d76cb9 (diff) | |
fix(eval): correct sieve-rank indexing + test expectations
- _compute_sieve_rank: find LARGEST k (not smallest) whose signature
contains all error preds — fixes P5(4) vs P5(1) bug
- _sieve_rank_signature: iterate all small_primes (not just p²≤n) to
catch composites like 209=11*19 where 11²>209
- Test expectations updated for [101,200] range (209 outside it)
- is_prime task: P1→P3 (no sieve-rank for classification tasks)
48/48 green.
Diffstat (limited to 'tests/test_phase3_flags.py')
| -rw-r--r-- | tests/test_phase3_flags.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/test_phase3_flags.py b/tests/test_phase3_flags.py index 063822e..5c42f07 100644 --- a/tests/test_phase3_flags.py +++ b/tests/test_phase3_flags.py @@ -35,12 +35,13 @@ def test_is_prime_sieve_stub_perfect_in_range(): assert em == 1.0 and tok == 1.0 -def test_is_prime_probe_classified_p1(): - """On [101,200] the sieve errs exactly on {121,143,169,187} (classified prime) -> P1.""" +def test_is_prime_probe_classified_p3(): + """On [101,200] the sieve errs on {121,143,169,187} (96% acc) -> P3 (is_prime has no sieve-rank).""" cfg = Config(task_mode="is_prime") r = probe_report(StubModel(_isprime_sieve), cfg) assert sorted(e["n"] for e in r["errors"]) == [121, 143, 169, 187], r["errors"] - assert r["code"] == "P1", r["code"] + assert r["code"] == "P3", r["code"] + assert r["acc"] >= 0.85 def test_train_frac_subsamples_train_only(): |
