fix: v0.21.1 — Windows UnicodeEncodeError, load_config str, recipe count

- fix: replace Unicode ⚠ (U+26A0) with ASCII [yellow]![/] in migrate
  warnings to prevent UnicodeEncodeError on Windows cp1251/cp866
- fix: load_config() now accepts str in addition to Path
- fix: recipe count in docs corrected from 30 to 29
- chore: bump version to v0.21.1
This commit is contained in:
Alpamys 2026-04-02 14:31:17 +05:00
parent eba63f2387
commit 0a4095eb0b
6 changed files with 10 additions and 9 deletions

View File

@ -1,6 +1,6 @@
# Soup CLI — Project CLAUDE.md
Soup is a CLI-first LLM fine-tuning tool (v0.21.0). Python 3.9+, MIT license.
Soup is a CLI-first LLM fine-tuning tool (v0.21.1). Python 3.9+, MIT license.
## Build & Development
@ -66,7 +66,7 @@ soup_cli/
axolotl.py # Axolotl YAML → SoupConfig migration
unsloth.py # Unsloth .ipynb → SoupConfig migration (AST-only, no exec)
recipes/
catalog.py # 30 ready-made RecipeMeta configs for popular models
catalog.py # 29 ready-made RecipeMeta configs for popular models
commands/
train.py # soup train (routes to SFT/DPO/GRPO/PPO/Reward/KTO/ORPO/SimPO/IPO)
deploy.py # soup deploy ollama (deploy GGUF to Ollama)
@ -173,7 +173,7 @@ soup version # Show version (--full for details)
- **LoraConfig**: r, alpha, dropout, target_modules, use_dora, use_rslora
15 built-in templates: chat, code, medical, reasoning, vision, audio, kto, orpo, simpo, ipo, embedding, rlhf, pretrain, moe, longcontext.
30 ready-made recipes via `soup recipes` (Llama 3.1/3.2, Qwen 2.5/3, Mistral, Gemma 3, Phi-4, DeepSeek R1).
29 ready-made recipes via `soup recipes` (Llama 3.1/3.2, Qwen 2.5/3, Mistral, Gemma 3, Phi-4, DeepSeek R1).
## Training Tasks

View File

@ -972,7 +972,7 @@ Automatically maps model, LoRA, training params, quantization, and task type. Wa
## Ready-Made Recipes
30 pre-built configs for popular models — no guessing hyperparameters:
29 pre-built configs for popular models — no guessing hyperparameters:
```bash
# List all recipes
@ -1353,7 +1353,7 @@ soup migrate --from llamafactory config.yaml Import config from LLaMA-Factory
soup migrate --from axolotl config.yml Import config from Axolotl
soup migrate --from unsloth notebook.ipynb Import config from Unsloth notebook
soup migrate --from llamafactory c.yaml --dry-run Preview without writing
soup recipes list List all 30 ready-made recipes
soup recipes list List all 29 ready-made recipes
soup recipes show llama3.1-8b-sft Print recipe YAML
soup recipes use llama3.1-8b-sft Copy recipe to soup.yaml
soup recipes search "reasoning" Search by keyword/task/size

View File

@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project]
name = "soup-cli"
version = "0.21.0"
version = "0.21.1"
description = "Fine-tune LLMs in one command. No SSH, no config hell."
readme = "README.md"
license = "MIT"

View File

@ -1,3 +1,3 @@
"""Soup CLI — Fine-tune LLMs in one command."""
__version__ = "0.21.0"
__version__ = "0.21.1"

View File

@ -91,7 +91,7 @@ def migrate(
migration_warnings = result.get("_warnings", [])
if migration_warnings:
from rich.markup import escape
warning_text = "\n".join(f" \u26a0 {escape(w)}" for w in migration_warnings)
warning_text = "\n".join(f" [yellow]![/] {escape(w)}" for w in migration_warnings)
console.print(Panel(
warning_text,
title="[yellow]Migration Warnings[/]",

View File

@ -11,8 +11,9 @@ from soup_cli.config.schema import SoupConfig
console = Console()
def load_config(path: Path) -> SoupConfig:
def load_config(path: "Path | str") -> SoupConfig:
"""Load a soup.yaml file and return validated SoupConfig."""
path = Path(path)
raw = yaml.safe_load(path.read_text(encoding="utf-8"))
if raw is None: