v0.53.10 closes 7 deferred packaging + UX issues from the v0.40 → v0.53 long tail. Pure no-GPU work — every feature is a pyproject.toml edit, lazy-import helper, frontend tab, or trainer callback that builds on machinery already exposed by v0.53.6 / v0.53.9.
What's New
[mix]+[data-pro]extras (#150, #113).pip install soup-cli[mix]bundlesscikit-optimizesosoup data mix --optimizeruns the real Bayesian loop.pip install soup-cli[data-pro]bundleslangdetect+presidio-analyzerfor broader language / PII coverage on top of the v0.47.0 regex baseline. Both helpers fall through silently when the optional package is missing.- PostHog env override (#154). New
SOUP_POSTHOG_KEY+SOUP_POSTHOG_ENDPOINTenv vars let operators point opt-in telemetry at their own PostHog project. Sentinel-based default cleanly distinguishes "caller omitted endpoint" from "caller pinned the default" so an explicit pin is NOT silently overridden by env. Endpoint goes through the v0.51.0 HTTPS + private-IP rejection policy. --hubonchat/serve/infer/merge/export/push(#152). Closes the v0.53.8 known-limitation that onlytrainanddata downloadcould route through ModelScope / Modelers. New sharedutils/hubs.prefetch_model_from_hub+apply_hub_to_cli_modelhelpers;pushusesutils.hubs.upload_repo(skips HF-specific Collections + model-card auto-render).soup data download --hublive SDK (#153). Lifts the v0.53.8 advisory-only path. ModelScope usesMsDataset.load(...), Modelers usesopenmind_hub.snapshot_download(repo_type='dataset', ...). Friendlypip install <sdk>advisory when missing.- Web UI Tool Outputs panel (#155). New tab polls
/api/tool-outputs?limit=100every 3 s; XSS-safe viadocument.createElement+td.textContent(noinnerHTMLfor user-controlled fields). Bearer token threaded via the v0.53.9 SPA bootstrap. - SFT callback
record_callwiring (#156).SoupTrainerCallback.on_step_endrecordstool_callscounts fromkwargs['inputs']into the global tool buffer so the Web UI panel populates from real training batches. Best-effort — training never crashes on observation failure.
Install / Upgrade
pip install -U soup-cli
# or with the new extras:
pip install -U 'soup-cli[mix,data-pro]'Security
13 review-fixes (4 HIGH / 5 MEDIUM / 4 LOW) landed in-release:
- HIGH PostHog endpoint precedence — sentinel-based default prevents env from silently overriding an explicit pin
- HIGH Absolute path leak in
local_pathadvisory reduced toos.path.relpath - HIGH Rich markup escape on
base/local_path/cache_dir(defends against[bold red]evil[/]injection from a craftedbase) - HIGH Callback
# noqa: BLE001per project policy - MEDIUM
import timemoved out oftryblock; oversize-key + explicit-empty-key rejection tests; source-grep regression guards - MEDIUM
prefetch_model_from_huboutside-cwdcache_rootrejection - LOW Empty-list + bool-True
tool_callsno-op tests;pushusesupload_repo+validate_hub_nameregression guard
Slug regex [^A-Za-z0-9._-]+ → __ neutralises path-separator + .. escapes in base before the cache-dir join; final is_under_cwd realpath check on the resulting cache dir. See SECURITY.md for the detailed fix-note.
Known Limitations
langdetectis not thread-safe —_langdetect_fastrebindslangdetect.DetectorFactory.seed = 0on every call to keep determinism; concurrent calls from multiple threads can interleave (inherent to the upstream library). The scoring pipeline is single-threaded today; tracked as a follow-up if multi-threaded scoring lands.- Llama-Guard-3-1B toxicity classifier NOT bundled in
[data-pro]— license + ~600 MB weight blob keep it out of an extras install. Operators wanting it usepip install transformers+pipeline('text-classification', model='meta-llama/Llama-Guard-3-1B')manually. apply_hub_to_cli_modelargument routing heuristic — the helper prefers rewritingbase_modelwhen set, else falls back tomodel. For a command where--modelis a remote repo id AND--baseis unset, themodelarg is rewritten.push --hub <non-hf>skips HF-specific features — HF Collections + model-card auto-render are HF-only; non-HF uploads use the rawupload_repopath.- PostHog endpoint precedence design — to lock the default URL against
SOUP_POSTHOG_ENDPOINTenv, callers must passendpoint=_POSTHOG_ENDPOINT(the module constant) explicitly. Omittingendpointhonors the env override (intended). --hubcovers model commands —data download --hubis also live, butdata push --hub,data forge --hub, etc. still route through HF. Multi-data-command rollout tracked for v0.53.11+.
Test count: 8285 → 8330 (+45 in tests/test_v05310.py).
🤖 Generated with Claude Code