From 224ba1a5f864242dc94adc7ad9c1b468222747aa Mon Sep 17 00:00:00 2001 From: Kral Date: Mon, 5 Oct 2026 18:05:49 +0200 Subject: [PATCH] Summary: correct the guard line; pipeline summary reads the limit from .env Co-Authored-By: Claude Sonnet 5.5 --- docs/yol-haritasi.md | 2 +- harness/pipeline.py | 6 ++++-- train/STATE.md | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/yol-haritasi.md b/docs/yol-haritasi.md index 15f772e..f476368 100644 --- a/docs/yol-haritasi.md +++ b/docs/yol-haritasi.md @@ -137,7 +137,7 @@ Durum (2026-10-05): 3.1 eğitim modu hazır (`harness/trainset.py`, havuz `tasks ### Stage 2 summary at 50 accepted trajectories (2026-10-05 18:02) - Tasks: 139 accepted of 166 generated (K variants 18); trajectory runs 59, accepted trajectories 50 (acceptance 85%). -- Budget: used 10.2 usage (ledger 27.5) since 2026-10-05; left to the guard 14.6 usage (ledger 39.5; reserve 8 ledger kept); allowance until 11 October 24.8 usage. +- Budget: used 10.2 usage (ledger 27.5) since 2026-10-05; left to the guard about 15 usage (ledger 18.5 to guard 113; reserve 8 ledger kept; corrected 2026-10-05, the running controller read the old limit 142); allowance until 11 October 24.8 usage. - Repair share (accepted trajectories with an error followed by a fix): 32/50 = 64%. - By category, accepted/runs: A 7/7 (repair 4); B 5/8 (repair 5); C 7/8 (repair 6); D 6/6 (repair 3); E 9/10 (repair 6); F 6/6 (repair 2); G 6/6 (repair 5); H 3/5 (repair 0); I 1/3 (repair 1). - By object type, accepted/runs: CLAS 38/42 (repair 21); DDLS 6/11 (repair 6); FUNC 6/6 (repair 5). diff --git a/harness/pipeline.py b/harness/pipeline.py index 0235369..97e8e35 100644 --- a/harness/pipeline.py +++ b/harness/pipeline.py @@ -277,13 +277,15 @@ class Pipeline: return "; ".join(f"{k} {v[1]}/{v[0]} (repair {v[2]})" for k, v in sorted(agg.items())) s = spent() used = (s - BASE_LEDGER) / LEDGER_TO_USAGE - guard = float(os.environ.get("BUDGET_LIMIT_USD", "0")) - float(os.environ.get("BUDGET_RESERVE_USD", "0")) + from .ledger import _env_budget + lim, res = _env_budget() + guard = lim - res text = f"""### Stage 2 summary at {n} accepted trajectories ({time.strftime('%Y-%m-%d %H:%M')}) - Tasks: {acc_t} accepted of {len(logs)} generated (K variants {sum(1 for l in logs if l.get('category') == 'K')}); \ trajectory runs {len(rows)}, accepted trajectories {len(accepted)} (acceptance {len(accepted) / max(len(rows), 1):.0%}). - Budget: used {used:.1f} usage (ledger {s - BASE_LEDGER:.1f}) since 2026-10-05; left to the guard {(guard - s) / LEDGER_TO_USAGE:.1f} usage \ -(ledger {guard - s:.1f}; reserve {os.environ.get('BUDGET_RESERVE_USD', '0')} ledger kept); allowance until 11 October {ALLOWANCE_USAGE - used:.1f} usage. +(ledger {guard - s:.1f}; reserve {res:g} ledger kept); allowance until 11 October {ALLOWANCE_USAGE - used:.1f} usage. - Repair share (accepted trajectories with an error followed by a fix): {repairs}/{len(accepted)} = {repairs / max(len(accepted), 1):.0%}. - By category, accepted/runs: {table('category')}. - By object type, accepted/runs: {table('object_type')}. diff --git a/train/STATE.md b/train/STATE.md index 0189b19..8fd5c4d 100644 --- a/train/STATE.md +++ b/train/STATE.md @@ -152,7 +152,7 @@ Training runs on HF Jobs with Unsloth, not on the Mac. No `mlx_lm` training. ### Stage 2 summary at 50 accepted trajectories (2026-10-05 18:02) - Tasks: 139 accepted of 166 generated (K variants 18); trajectory runs 59, accepted trajectories 50 (acceptance 85%). -- Budget: used 10.2 usage (ledger 27.5) since 2026-10-05; left to the guard 14.6 usage (ledger 39.5; reserve 8 ledger kept); allowance until 11 October 24.8 usage. +- Budget: used 10.2 usage (ledger 27.5) since 2026-10-05; left to the guard about 15 usage (ledger 18.5 to guard 113; reserve 8 ledger kept; corrected 2026-10-05, the running controller read the old limit 142); allowance until 11 October 24.8 usage. - Repair share (accepted trajectories with an error followed by a fix): 32/50 = 64%. - By category, accepted/runs: A 7/7 (repair 4); B 5/8 (repair 5); C 7/8 (repair 6); D 6/6 (repair 3); E 9/10 (repair 6); F 6/6 (repair 2); G 6/6 (repair 5); H 3/5 (repair 0); I 1/3 (repair 1). - By object type, accepted/runs: CLAS 38/42 (repair 21); DDLS 6/11 (repair 6); FUNC 6/6 (repair 5).