Summary: correct the guard line; pipeline summary reads the limit from .env

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Kral
2026-10-05 18:05:49 +02:00
parent 5bcd1bf9cd
commit 224ba1a5f8
3 changed files with 6 additions and 4 deletions

View File

@@ -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).

View File

@@ -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')}.

View File

@@ -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).