Commit Graph

10 Commits

Author SHA1 Message Date
Alpamys 8f9c8435b1 chore: apply pre-commit whitespace fixes
Output of the first `pre-commit run --all-files` after the hooks were finally
activated in d0b7c62: trailing whitespace stripped and end-of-file newlines
normalised across 18 files.

No semantic change — `git diff --ignore-all-space --ignore-blank-lines` over
the whole set is empty. Committed as one batch on purpose: left alone, these
would surface as unrelated noise in the next real diff to each of these files,
since the hooks now fix them on the way past.
2026-08-05 02:48:49 +05:00
Alpamys a95fedeb0e fix(cli): quote install hints so `pip install soup-cli[extra]` works on cmd.exe (v0.71.37)
Every printed and documented `pip install 'soup-cli[extra]'` was bash / zsh /
PowerShell syntax and failed on Windows cmd.exe:

    ERROR: Invalid requirement: "'soup-cli[train]'": Expected package name at
    the start of dependency specifier

cmd.exe has no single-quote quoting, so it passes the quotes to pip verbatim
and pip rejects the requirement. Nothing in Soup can fix that once the command
is typed -- pip and the shell own it, and Soup is not installed yet when the
README line runs -- so the fix is the spelling we print.

Migrated 147 sites across 67 files to `pip install "soup-cli[extra]"`:
  - 64 in src/  (Rich console hints + plain ImportError text)
  - 57 in README.md + docs/
  - 22 in src/soup_cli/templates/*.yaml + examples/configs/*.yaml
  -  3 in examples/README.md

Double quotes are the only spelling valid in every shell (cmd, PowerShell,
bash, zsh), which is why the repo already used `pip install -e ".[dev]"`.
Measured on Windows: single quotes fail ONLY on cmd; double quotes pass
everywhere; bare passes on Windows but zsh globs `[extra]` and fails.

Method note (the PR #247 class): the hints sit INSIDE double-quoted Python
string literals, so a blind ' -> " sed produces SyntaxError. A tokenize-based
rewriter escaped `\"` in DQUOTE tokens and left bare `"` in TRIPLE / COMMENT
tokens; every touched .py was compile-checked. The full suite (not ruff, not
compile-check) caught two rewriter blind spots: the real YAML templates under
src/soup_cli/templates/ (byte-identical drift test) and examples/README.md.

A regression test (tests/test_v07137.py) scans the package and every docs code
block for the single-quoted form; prose may still name it so a reader from an
older tutorial recognises the error.

Also bundles #315 (@Sanjays2402): eval-gate benchmark tasks now run via
ForgettingDetector instead of a helper that never existed. Closes #310.

Test count: 16283 -> 16288 (+4 in tests/test_v07137.py).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-17 20:40:54 +05:00
Alpamys 55dd6301b5 docs: v0.71.36 Data Moat II (version bump + CHANGELOG + docs)
Version 0.71.35 -> 0.71.36 in pyproject.toml + __init__.py.

Docs are written around what the live smoke MEASURED, not what the plan
assumed:

- The semantic-dedup headline is WITHDRAWN. docs/data.md leads with the
  measured overlap: paraphrase cosines (0.49-0.76) overlap genuinely-distinct
  rows (0.54-0.76), and "Add two numbers"/"Multiply two numbers" (0.759)
  scores HIGHER than the true paraphrase "reverse a string"/"invert the order
  of characters" (0.491). No threshold separates them, so the page says
  plainly that lowering --threshold trades duplicates for silent data loss,
  and explains why the 0.8 default is deliberately conservative. The claim it
  does make -- catches REWORDINGS MinHash's shingling misses (0.88-0.91) --
  is the one the numbers support.
- docs/data.md canary section states the real verdict rule (binomial tail
  over the count, not any-single-canary) and why: at K=16 an any-canary rule
  fires on a CLEAN model ~15% of the time.
- docs/training.md --replay reports the honest result: 7% better retention
  than control, but forgetting without it was only +4% (mild), so it is
  proof-of-mechanism at 135M + LoRA, not a production claim.
- CHANGELOG known-limitations carry the same numbers rather than hedging.
- README What's New leads with the two blocking bugs the smoke found (the
  hardware-fit gate refusing locally-merged models; the [extra] hints
  printing without the extra).

Counts 16001 -> 16254 tests, 313 -> 314 files (CONTRIBUTING).
2026-07-17 12:03:15 +05:00
Alpamys 5369e81d9d docs(v0.71.32): version bump + CHANGELOG/README/docs for ASR (Whisper) fine-tuning 2026-07-07 17:24:40 +05:00
Alpamys 8f59b9b9d7 docs(v0.71.31): judge-in-the-loop suite — version bump, CHANGELOG, docs, recipe, counts
Bump 0.71.30 -> 0.71.31; +1 recipe online-dpo-smollm2-135m (137->138); CHANGELOG
[0.71.31]; README What's New; docs (training/data/evaluation/commands/serving);
recipe-count test asserts 137->138.
2026-07-06 13:51:23 +05:00
Alpamys 937abb9e0d feat(data): soup data doctor + soup data lint — Fine-tune Doctor (v0.71.27)
Add `soup data doctor` and `soup data lint`, killing the top *silent*
fine-tune failures before a single training step: EOS-missing-from-labels
(the #1 "model never stops generating" bug), BOS duplication, no-system-role
templates, and preference-data length bias (the #1 silent DPO degradation) —
none of which any competitor (Unsloth/Axolotl/LlamaFactory) checks for.

- utils/data_doctor.py: 8-check chat-template compat report over a
  tokenizer + sampled rows, OK/MINOR/MAJOR taxonomy mirroring diagnose;
  --show-mask N renders per-token trained/masked colouring through the
  SAME masking dispatch (_build_row_labels) the report itself uses, so
  the two can never disagree about what's actually trained.
- utils/data_lint.py: preference-data linter (dpo/orpo/simpo/ipo/bco/kto)
  — length bias (Cohen's d), label imbalance, near-duplicates (MinHash),
  identical chosen==rejected pairs, prompt leakage.
- commands/data_doctor.py: Typer layer for both commands; strips C0
  control bytes before untrusted dataset content reaches the terminal.
- commands/diagnose.py: hardens the --evidence loader against a TOCTOU
  symlink swap (O_NOFOLLOW + fstat-on-open-fd), backporting the pattern
  soup ship shipped in v0.71.25 (closes v0.71.25 known-limitation (4)).

Live smoke against the real HuggingFaceTB/SmolLM2-135M-Instruct tokenizer
(Windows + RTX 3050) found and fixed two genuine bugs beyond the synthetic
fixtures: the EOS check needed to span-search the whole trained region
(not just the last token), and two apply_chat_template call sites needed
a broad except Exception for jinja2.exceptions.TemplateError.

+173 tests (14788 -> 15042). 5 sequential ECC reviews, every finding fixed.
2026-07-04 14:03:30 +05:00
gittihub-jpg 8d3a7640c8
feat(build): manifest-level dotted-path custom transforms (#255)
Closes #249

Extends resolve_transform to import module:func dotted paths (lazy, lru-cached, arity-validated). Trusted-input posture documented in docs/data.md.

Co-authored-by: gittihub-jpg <gittihub-jpg@users.noreply.github.com>
2026-06-04 17:37:12 +05:00
Alpamys a1463bf716 feat(v0.71.6): live build runner + Magpie generator + 2PL/3PL IRT + augment fix
Lift the v0.69.0 deferred stubs to live + extend IRT + fix a real bug:

- #231 soup build materialises (5 built-in transforms, table/view/incremental
  with SQLite-tracked config-fingerprint cache key, atomic JSONL, --output-dir)
- #232 soup data gen-magpie live (ollama/vllm raw-completion harvest; anthropic
  rejected; optional --quality-filter; dedup-before-response)
- #167 tokenizer-aware memorization probe (sub-word/BPE overlap, library-only)
- #213 soup eval irt-subset --model 2pl|3pl (joint coordinate-ascent MLE)
- #75 fix soup data augment --provider ollama|vllm ImportError + QA log

Security: validate_ollama_url/validate_vllm_url reject 0.0.0.0; augment output
containment+symlink reject; magpie response-body cap.

Tests 12581 -> 12703 (+122 in tests/test_v0716.py). Full suite green, ruff clean.
2026-06-02 22:06:12 +05:00
Alpamys 1f63393421 feat(v0.71.5): ingest/data/prompt/drift polish
Closes #157, #205, #207, #149, #164, #163. Defers #204 (live SaaS pull —
paid accounts, infra-blocked, kept open).

- #164: get_metric_series falls back to eval_results when metrics is empty
- #163: build_verdict confidence biased by advise_history (same project+choice,
  >=3 precedents); decision never changes
- #207: shared utils/webhooks.py (SSRF-hardened) + --slack-url/--discord-url on
  ingest/prune-prompt/ab/active-sample; ab fires only on a decision
- #205: soup prune-prompt --tokenizer (token-prefix detect + decode remainder,
  boundary-safe)
- #149: DynamicCurriculumCallback buckets by loss/perplexity percentile;
  length keeps round-robin
- #157: soup data push/forge --hub modelscope|modelers (data score N/A)

107 new tests in tests/test_v0715.py (12474 -> 12581). ruff clean.
2026-06-02 14:34:36 +05:00
Alpamys 7724353ac6 docs: trim README to a 238-line front door; move feature reference to docs/
The README had grown to 5046 lines (195 sections) — roughly one deep-dive per
feature accreted over 70 releases. Split it into a concise front door plus a
public docs/ tree:

- README (5046 -> 238 lines): hero, why, quickstart, config, a Documentation
  map, data formats, common commands, models, Docker, requirements, dev.
- docs/*.md: all 185 feature sections preserved verbatim, grouped into 10 themed
  guides + an index. Every original line is accounted for (content-conservation
  checked); all 235 internal links + anchors verified to resolve.
- un-gitignore docs/ (it was empty); fix a pre-existing dangling
  docs/QUANTIZATION.md link; correct the stale `ruff check soup_cli/` ->
  `src/soup_cli/` reference in the Development section.

No version bump: docs-only — rides into the 0.71.0 deps-split release.
2026-05-31 20:10:59 +05:00