From 50ccf15113bd826affd103401499ace0d015b6f9 Mon Sep 17 00:00:00 2001 From: Alpamys Date: Fri, 3 Apr 2026 14:01:16 +0500 Subject: [PATCH] =?UTF-8?q?fix:=20v0.23.0=20security=20=E2=80=94=20trust?= =?UTF-8?q?=5Fremote=5Fcode=20warning=20panels=20for=20AWQ/GPTQ=20export?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .claude/CLAUDE.md | 2 ++ soup_cli/commands/export.py | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index fadc729..8e3d125 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -275,6 +275,8 @@ soup version # Show version (--full for details) - **AWQ/GPTQ export**: calibration data path traversal protection — resolve + relative_to(cwd) (v0.23.0) - **AWQ/GPTQ export**: output path stays under cwd (v0.23.0) - **Curriculum config**: curriculum_buckets bounded ge=1, le=20 (v0.23.0) +- **AWQ/GPTQ export**: trust_remote_code warning panel before model loading (v0.23.0) +- **Data split**: output files written to input's parent dir (consistent with sample_data) (v0.23.0) ## Code Conventions diff --git a/soup_cli/commands/export.py b/soup_cli/commands/export.py index 89a869e..1b26bf3 100644 --- a/soup_cli/commands/export.py +++ b/soup_cli/commands/export.py @@ -709,6 +709,13 @@ def _export_awq( ) try: + console.print( + Panel( + "[yellow]Warning:[/] Loading model with trust_remote_code=True.\n" + "This may execute custom code from the model directory.", + title="Security Notice", + ) + ) console.print("[dim]Loading model for AWQ quantization...[/]") model = AutoAWQForCausalLM.from_pretrained(str(source_path)) tokenizer = AutoTokenizer.from_pretrained(str(source_path), trust_remote_code=True) @@ -817,6 +824,13 @@ def _export_gptq( ) try: + console.print( + Panel( + "[yellow]Warning:[/] Loading model with trust_remote_code=True.\n" + "This may execute custom code from the model directory.", + title="Security Notice", + ) + ) console.print("[dim]Loading model for GPTQ quantization...[/]") quantize_config = BaseQuantizeConfig( bits=bits,