Skip to content

armgit / Soup

Public Imported from GitHub
0

Fine-tune LLMs from one YAML. Layer streaming trains an 8B model on a 4 GB laptop GPU.

test(lock): preserve Sohaib Kamash's filename regression (#1941) (#2012)

Alpamys Makazhan463349f58d03
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index f815e0eb..2755ffbe 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -402,6 +402,8 @@ Listed by first contribution. PR numbers link the work.
- `soup export --registry-id` and `--deploy` did something only on the plain GGUF branch, so eight export formats finished "successfully" with nothing recorded in the registry and nothing deployed. They claimed that one row of the #1448 audit with a plan first, refused `--deploy` up front for the five formats Ollama cannot load, forwarded it for the three that produce a GGUF, and wired the registry attach into every format. After review they dropped an unrelated commit, made a TensorRT export record its engine files, recorded every shard and data file with the names in the success line, and added a test that stubs only the third-party converters, which pinned the seven helper returns that the first set of tests had replaced. 32 tests fail on `main`; 26 of 28 mutations are caught, including all seven return mutations ([#1448](https://github.com/MakazhanAlpamys/Soup/issues/1448), [#1679](https://github.com/MakazhanAlpamys/Soup/pull/1679))
- The CUDA out-of-memory and `OutOfMemoryError` hints in `utils/errors.py` never named `data.max_length`, the lever left at batch size 1 on a large-vocabulary model, where logits and loss scale with sequence length. They added "lower data.max_length" to both entries and pinned the text with tests that check the message each error path prints as well as the ERROR_MAP entries themselves ([#1694](https://github.com/MakazhanAlpamys/Soup/issues/1694), [#1708](https://github.com/MakazhanAlpamys/Soup/pull/1708))
+ - Preserved the additional corrupt-lock filename regression from the paused contribution: both `lock show custom.lock` and `lock check custom.lock` must report the actual filename. This adds coverage to the accepted production behavior from #1833, with a hardcoded-filename mutation caught by the new cases ([#1941](https://github.com/MakazhanAlpamys/Soup/pull/1941)).
+
- **Tal** ([@taljeon](https://github.com/taljeon))
- Prevented duplicate eval-gate task names from overwriting baseline evidence ([#1824](https://github.com/MakazhanAlpamys/Soup/issues/1824), [#1893](https://github.com/MakazhanAlpamys/Soup/pull/1893)).
- First contribution, and it closed a gap in a guard that was **one day old**: the `dtype=` scanner from #489 matched only class names starting with `AutoModel`, so the same load-breaking kwarg on a CONCRETE class — `WhisperForConditionalGeneration.from_pretrained` in the ASR training path — was invisible to it. They took the **suffix rule** rather than a name allowlist, which is the harder and correct choice: an allowlist silently stops covering a class added later. Verified with a negative control rather than by inspection — `dtype="auto"` on the real Whisper site fails by name on their branch and **survives on `main`**, so the gap was real. Two things I check on every widening they got right unprompted: the existing `AutoModel*` coverage was not traded away for the new coverage, and the scanner still ignores `FastLanguageModel`, `PeftModel`, `torch.zeros` and wrapper kwargs — a guard that fires on correct code is one people delete. All six deleted lines are renames or a reworded message; the file goes 11 tests to 12 ([#497](https://github.com/MakazhanAlpamys/Soup/pull/497))
diff --git a/tests/test_issue1830_cli_message_gaps.py b/tests/test_issue1830_cli_message_gaps.py
index ee895c1d..50f9cf07 100644
--- a/tests/test_issue1830_cli_message_gaps.py
+++ b/tests/test_issue1830_cli_message_gaps.py
@@ -100,6 +100,7 @@ def test_expect_suite_path_that_is_a_directory_names_the_problem(tmp_path, monke
# ---------------------------------------------------------------------------
[email protected]("filename", ["soup.lock", "custom.lock"])
@pytest.mark.parametrize(
"args",
[
@@ -114,16 +115,18 @@ def test_expect_suite_path_that_is_a_directory_names_the_problem(tmp_path, monke
],
ids=["show", "check"],
)
-def test_lock_commands_name_a_corrupt_lock_file(tmp_path, monkeypatch, args):
+def test_lock_commands_name_a_corrupt_lock_file(tmp_path, monkeypatch, args, filename):
monkeypatch.chdir(tmp_path)
- (tmp_path / "soup.lock").write_text("garbage:", encoding="utf-8")
+ (tmp_path / filename).write_text("garbage:", encoding="utf-8")
- result = CliRunner().invoke(app, args)
+ result = CliRunner().invoke(
+ app, [filename if value == "soup.lock" else value for value in args]
+ )
assert result.exit_code == EXIT_USAGE_ERROR, (result.output, repr(result.exception))
plain = _plain(result.output)
assert "not valid JSON" in plain
- assert "soup.lock" in plain
+ assert filename in plain
def test_lock_show_names_a_lock_file_that_is_not_utf8(tmp_path, monkeypatch):