diff --git a/strata_control/progress_words.py b/strata_control/progress_words.py index 90933d6a02..609027082d 100644 --- a/strata_control/progress_words.py +++ b/strata_control/progress_words.py @@ -102,8 +102,8 @@ def describe(step: int | None, lines: list[str], download: dict | None = None) - return Words("draft_download", "Downloading the draft layer (about 5 GB; it makes answers about twice as fast)") if "mtp_rt.py" in low or "mtp_pack.py" in low: return Words("draft", "Preparing the draft layer") - if "[ok] model prepared" in low: # the model is prepared and no draft-layer step ran after it (Off, DFlash2, offline, the layer already here - return Words("pack", "Preparing your model for Strata (one time)") # says "[ok] MTP draft layer" above): the model-preparation words, not the draft layer's + if "[ok] model prepared" in low or not marker: # nothing is being prepared (the model is prepared, or step 6 has only begun) and no draft-layer step runs: + return Words("verify", "The model files are on this computer; checking them") # words that claim no preparation (0.2.14.1 check: no "(one time)" on every launch) if "strata_pack.py" in low or "converting the q2_0 experts" in low: return Words("pack", "Packing the model's experts for your processor (one time, a few minutes)") if "pack_index.py" in low: diff --git a/tests/terminal/test_progress_words.py b/tests/terminal/test_progress_words.py index 253968a341..bcd21d25a0 100644 --- a/tests/terminal/test_progress_words.py +++ b/tests/terminal/test_progress_words.py @@ -106,7 +106,14 @@ class StepWords(unittest.TestCase): [" [ok] DFlash2 is the drafter: the MTP draft layer's ~5 GB are not downloaded (choosing the MTP later fetches it once)"]): with self.subTest(after=after): p, label, phase = prog(HEAD + STEP5 + STEP6 + [" [ok] model prepared: y", *after]) - self.assertEqual((label, phase), ("Preparing your model for Strata (one time)", "pack")) + self.assertEqual((label, phase), ("The model files are on this computer; checking them", "verify")) + + def test_step_six_claims_preparation_only_while_it_runs(self): + # 0.2.14.1 check (M5 Max): "Preparing your model for Strata (one time)" on every launch, also a 4-5 s restart with the model prepared + self.assertEqual(prog(HEAD + STEP5 + STEP6)[1:], ("The model files are on this computer; checking them", "verify")) + self.assertEqual(prog(HEAD + STEP5 + STEP6 + [" > python tools/iq_pack.py --gguf x --out y"])[1:], + ("Preparing the model data for the engine (one time)", "pack")) + self.assertEqual(prog(HEAD + STEP5 + STEP6 + [" > python tools/strata_pack.py --gguf x --out y"])[2], "pack") def test_step_six_with_everything_already_there(self): lines = HEAD + STEP5 + STEP6 + [" [ok] model prepared: y", " [ok] MTP draft layer: z"]