What's New
Three v0.X.0 deferred-stub features become live runtime — closes #33 (harvester judge filter + serve trace log) and #64 (live CUDA OOM probe). #65 (multipack live wiring in HF Trainer) remains deferred to v0.40.4 after the adversarial 5th-review pass surfaced a Sampler[int] vs list[list[int]] shape mismatch with HF Trainer's DataLoader.
- Live CUDA batch-size probe —
auto_batch_size_strategy: probenow runs ONE forward+backward+step on a synthetic batch per candidate before training. Ontorch.cuda.OutOfMemoryErrorthe probe halves; otherwise it doubles. Result is cached per(model, max_length, quant, lora_r, gpu)tuple so the next run short-circuits. SFT-only this release. - Multipack helpers —
make_multipack_trainer_class(lru-cached subclass factory),attach_multipack_state(with bool-rejection + empty-lengths reject),lengths_from_dataset(with all-zero WARNING),detect_arch_name. The schema gate already rejectsmultipack: trueon unsupported tasks. Live trainer wiring is deferred to v0.40.4 —multipack: truecurrently prints a yellow advisory and falls back to the standard sampler. soup data from-traces --judge— optional LLM-as-a-judge pass over harvested preference pairs.--judge-provider openai|server|ollama,--judge-model gpt-4o-mini,--min-confidence 0.7. Drops pairs whose normalised(chosen - rejected)confidence falls below threshold. Per-pair backend exceptions counted (not crashed); lazyitertools.islicecap; cost-shock warning before the loop (2× per pair).soup serve --trace-log <path>— passive append-only JSONL request log ({prompt, response, latency_ms, tokens, ts}per chat completion). Path-containment validated, 100 MB rotation cap (one backup retained, symlink-reject on rotate),hf_*/sk-*/Bearer …token shapes redacted to<redacted>before write (recursively inextradict too). Streaming SSE path also records.
Behaviour change: v0.40.2 users with auto_batch_size_strategy: probe were silently getting the static fallback. v0.40.3 actually runs a CUDA probe on first run (~5–30s, cached).
Install / Upgrade
pip install --upgrade soup-cliSecurity
_redact_secretsregex withBearerbody excluding.so end-of-sentence period survives.- Symlink-reject on
<trace-log>.1rotation backup (TOCTOU defence, mirrors v0.33.0 #22 policy). judge_providerallowlist validation at the CLI boundary BEFORE constructor invocation.len(tokenizer)(notvocab_size) boundspad_idin CUDA probe — prevents pad folding to a random byte token on extended-vocab tokenizers (Llama-3 +<|pad|>).- Path containment via shared
is_under_cwdon--trace-logpath.
Known Limitations
- Multipack live HF Trainer wiring deferred to v0.40.4 — adversarial review of v0.40.3 caught a
Sampler[int]vslist[list[int]]mismatch; settingmultipack: trueprints a yellow advisory and falls back to the standard sampler. Live wiring requires aget_train_dataloaderoverride. - Live CUDA probe (
make_cuda_probe_fn) is wired in SFT only; non-SFT trainers still use the static estimate. TraceLogWriterretains exactly ONE backup file (<path>.1); operators wanting longer retention should arrange external rotation.- Multi-worker uvicorn deployments writing to the same
--trace-logpath race on rotation — single-process assumption. - Custom HF Space templates from v0.40.2 still always create the Space with
space_sdk="gradio"; tracked for v0.40.4+. --judgeissues TWO judge calls per pair (chosen + rejected); a yellow projected-call-count warning prints before the loop.