Commit Graph

13 Commits

Author SHA1 Message Date
Alpamys e44e0bd663 fix(ci): Windows encoding failure in TestGRPOCPUMinNewTokens
Two tests in tests/test_bugfixes.py::TestGRPOCPUMinNewTokens fail on
windows-latest / Python 3.11 when importing trl.trainer.grpo_trainer:

    RuntimeError: Failed to import trl.trainer.grpo_trainer because of
    the following error:
    'charmap' codec can't decode byte 0x90 in position 6555: character
    maps to <undefined>

Root cause: upstream trl reads an auxiliary file without an explicit
encoding, so Python uses the system default. On Windows that is cp1252
('charmap'), which chokes on non-ASCII bytes present in the file. This
is an upstream issue but Soup needs a green CI.

Two-layer fix:

1. .github/workflows/ci.yml — set PYTHONUTF8=1 and PYTHONIOENCODING=utf-8
   as job-level env. Python's UTF-8 mode makes all file I/O default to
   UTF-8 regardless of locale, which is the correct global fix for this
   class of bug.

2. tests/test_bugfixes.py — add a _trl_grpo_importable() helper that
   returns False on UnicodeDecodeError / ImportError / RuntimeError, and
   use it as a belt-and-braces skip in both TestGRPOCPUMinNewTokens
   tests. Ensures the tests skip cleanly instead of erroring out if a
   future CI change accidentally drops PYTHONUTF8.

Local verification: both tests pass with 'pytest tests/test_bugfixes.py::
TestGRPOCPUMinNewTokens -v' (Python 3.10, Windows).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 13:12:44 +05:00
Salil M 0f5d42f706
Enhance #14 - Add official Docker support for easier onboarding (#20)
* feat: add Dockerfile with CUDA 12.1 and Python 3.11 for Soup

* feat: add docker-compose.yml with GPU passthrough and volume mounts

* chore: add .dockerignore to exclude caching and local data from image

* ci: add GitHub action to build and publish Docker image to GHCR

* docs: add Docker installation and usage instructions to README
2026-04-10 23:04:00 +05:00
Alpamys 559203c2e3 fix: v0.22.1 — Python 3.9 compat (str | None → Optional[str]), version bump
The v0.22.0 release broke CI on Python 3.9 because serve.py used
PEP 604 union syntax (str | None) at module level, which requires 3.10+.
Fixed in previous commit; this bumps version to v0.22.1 for a clean PyPI release.
2026-04-03 13:09:16 +05:00
Alpamys 1718578a1a test: add subprocess CLI tests + cross-platform CI matrix
- Add test_cli_subprocess.py (69 tests): real subprocess execution
  testing entry points, encoding, paths, Unicode, platform regressions
- CI matrix: ubuntu/windows/macos × Python 3.9/3.11/3.12 (9 jobs)
- CI: add coverage reporting with Codecov upload
- Update CLAUDE.md and CONTRIBUTING.md test counts (1022 → 1091)
2026-03-26 10:24:58 +05:00
Alpamys d2ef452bac Fix Phase 6.1 community files: real emails, DPO data format, correct file names
- Replace fake @soup-cli.dev emails with real contact (vpn.alpamys@gmail.com)
- Add GitHub Security Advisories link in SECURITY.md
- Fix FUNDING.yml: ko_fi → buy_me_a_coffee
- Rewrite chat_preferences.jsonl with proper DPO chosen/rejected pairs
- Fix examples/README.md: correct file names, remove nonexistent files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 11:19:56 +05:00
Alpamys f4663427e9 update d 2026-03-23 23:28:07 +05:00
Alpamys 38b2719b7f update readme 2026-03-23 23:22:22 +05:00
Alpamys e0f8e921bd Release v0.10.0: Phase 6.1 - Community (CONTRIBUTING, CODE_OF_CONDUCT, SECURITY, examples, FUNDING) 2026-03-23 23:10:45 +05:00
Alpamys dc518ba1fc Add GitHub templates, downloads badge, and repo topics
- Issue templates (bug report with soup doctor output, feature request)
- PR template with checklist
- Downloads badge via pepy.tech
- GitHub topics: llm, fine-tuning, lora, qlora, pytorch, etc.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 20:00:32 +05:00
Alpamys 5de18dc325 Fix CI badge: read test count from testsuite element, not root
pytest junitxml wraps results in <testsuites><testsuite tests="N">,
the count is on the child element, not the root.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 20:01:44 +05:00
Alpamys ee9aefcc55 Add dynamic test count badge via Gist endpoint
CI now parses pytest junitxml output and updates a public Gist with the
exact test count. Shields.io reads the Gist as an endpoint badge.
Requires GIST_TOKEN secret (PAT with gist scope).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 19:36:08 +05:00
Alpamys fe17addf5c Add GitHub Actions workflow for auto-publish to PyPI on tag
Triggers on `git tag v0.2.0 && git push --tags`.
Uses PyPI trusted publisher (OIDC) — no token needed in secrets.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 21:07:55 +05:00
Alpamys d6e932a1d3 Initial project setup: CLI skeleton + config + trainer + data pipeline
- Typer CLI: soup init, soup train, soup data inspect/validate
- Pydantic config schema with YAML loader and validation
- Data pipeline: JSONL/JSON/CSV/Parquet + HuggingFace datasets
- Format detection: Alpaca, ShareGPT, ChatML (auto-detect)
- SFT trainer wrapper over transformers + peft + trl
- QLoRA/LoRA support with auto batch size estimation
- GPU detection (CUDA/MPS/CPU) and memory calculation
- Rich live terminal dashboard for training monitoring
- Config templates: chat, code, medical
- Tests (pytest) + GitHub Actions CI
- MIT license

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 16:14:56 +05:00