Commit Graph

5 Commits

Author SHA1 Message Date
Kondamwar Akshaya Shrikant e4065d8741
Fix friendly error mappings 272 (#282)
* Improve friendly error mappings and tests

* Improve friendly error mappings and tests
2026-06-22 15:54:55 +05:00
Alpamys 894cb632dd chore: release v0.71.0 — split heavy deps into [train] extra
Heavy training stack (torch, transformers, peft, trl, datasets,
bitsandbytes, accelerate) moves out of the core install into a new
[train] optional-dependency extra. `pip install soup-cli` is now a
light CLI + data-tools install with no PyTorch; `pip install
'soup-cli[train]'` adds the training stack.

- pyproject: new [train] + [all] extras; [dev] self-references [train]
  so CI (`pip install -e ".[dev]"`) still gets torch. Pins unchanged.
- errors.py: missing torch/transformers/peft/trl/datasets/bitsandbytes/
  accelerate now surface a single 'install soup-cli[train]' fix.
- Dockerfile: install soup-cli[train,serve,data,eval] so the GPU image
  can still fine-tune.
- README + docs/models.md: split install into light core vs [train].
- CHANGELOG: cut [0.71.0]; bump version 0.70.0 -> 0.71.0.
2026-06-01 12:27:08 +05:00
Alpamys 89b06efb8c feat(longctx): v0.53.4 — Long Context + Architecture
Six closes lifting the v0.49.0 LongLoRA hardening + v0.41.0 LLaMA Pro
deferred stubs, plus a UX upgrade to the CUDA-OOM friendly message:

- #11   utils/errors.py: OOM hint now names --batch-size / --grad-accum
- #122  flash_attn.is_flash_attn_v3_available() + LongLoRA+FA3 schema reject
- #120  LongLoRA arch allowlist expansion (Mistral / Qwen / Phi); Mixtral
        intentionally excluded (regex matches the bare 'mistral' token only)
- #121  apply_long_context_config auto-detects 'llama3' when caller passes
        rope_scaling_type=None and the model config carries a Llama 3.1
        rope_scaling block
- #83   block_expansion.expand_model_blocks LIVE (deepcopy last-N blocks,
        zero-init residual projections, append, bump num_hidden_layers) +
        apply_llama_pro_freeze + shared apply_block_expansion_if_configured
        helper wired into SFT + Pretrain (mirrors v0.40.6 peft_wiring
        centralisation policy so SFT and Pretrain stay in lock-step)
- #74   HF push surface QA — test plan recorded in tests/qa/v053_qa.md;
        live execution against a private HF repo deferred to a credentialed
        contributor

Review pipeline (python / code / security / tdd agents) ran; every
CRITICAL -> LOW finding addressed:
- bool-first guards in _check_model_name (defends against int subclass)
- is_supported_longlora_arch defensive non-string surface (returns False,
  never raises) matching v0.53.3 is_known_vlm_base policy
- _truncate_for_message(value, limit=64) bounds the base echo in
  LongLoRA error messages (security MEDIUM, mirrors v0.34.0 crash.py)
- null-byte + non-string TypeError guards on validate_longlora_compat
  task / backend params (matches v0.50.0 validate_long_context_grpo_compat)
- _get_layers_module uses explicit `is None` not falsy shortcut (defends
  against nn.Module.__bool__ overrides on subclasses)
- _zero_init_block_residual returns bool + warnings.warn when neither
  standard projection matches the cloned block (non-Llama-shaped arches
  still train but lose the LLaMA Pro identity-init guarantee)

Test count: 7879 -> 7935 (+56 net; +49 in new tests/test_v0534.py).
Lint clean. CPU smoke verified on a real transformers.LlamaForCausalLM:
4 -> 6 layers, down_proj + o_proj actually zeroed on PyTorch tensors,
old blocks frozen + new blocks trainable, forward pass finite.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 14:52:10 +05:00
Alpamys 588eae4b9f Fix ANSI escape code issue in verbose help output test
Rich markup splits --verbose with escape codes on CI, check for
"verbose" instead of "--verbose".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 19:22:53 +05:00
Alpamys df21329a52 Add Phase 3.1: friendly errors, soup doctor, soup quickstart, UX polish (v0.3.1)
- Friendly error messages: wrap all commands in try/except, map known errors
  (CUDA OOM, missing deps, connection errors) to 2-3 line messages with fix hints
- Global --verbose flag for full tracebacks
- soup doctor: check system info, GPU, all dependency versions with fix suggestions
- soup quickstart: one-command demo (creates data + config + trains TinyLlama)
- Confirmation prompts before train/sweep (skip with --yes)
- 40 new tests (321 total), all passing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 19:10:36 +05:00