diff --git a/terminal/data/ling32-sources.json b/terminal/data/ling32-sources.json index 1445b6fa9a..ee0ed55d91 100644 --- a/terminal/data/ling32-sources.json +++ b/terminal/data/ling32-sources.json @@ -1,6 +1,6 @@ { - "note": "Download sources for Ling-3.2-Air (Ling-3.2-Air-SQ-96.strata, Ling-3.2-Air-Vision.strata, Ling-3.2-Air-MTP.strata). THE RELEASE SWITCH is the word `released`: false (now) = the model is not published, the sources below are prepared but ignored, and Ling is offered only for files on the disk, a source set by hand (STRATA_LING32_SOURCE, the config key ling32_source) or STRATA_LING32_SHOW=1; true = Ling is in every model list and these sources are used in order. The Hugging Face repo is private until the release (the owner flips it public at the same time). Add the public R2 base here before the flip if it is wanted as the second source.", - "released": false, + "note": "Download sources for Ling-3.2-Air (Ling-3.2-Air-SQ-96.strata, Ling-3.2-Air-Vision.strata, Ling-3.2-Air-MTP.strata). THE RELEASE SWITCH is the word `released`: true (0.2.25, flipped for the release) = Ling is in every model list and these sources are used in order; false = the model is not published, the sources below are ignored, and Ling is offered only for files on the disk, a source set by hand (STRATA_LING32_SOURCE, the config key ling32_source) or STRATA_LING32_SHOW=1. The Hugging Face repo has to be public from the moment a build with true ships. Add the public R2 base here if it is wanted as the second source.", + "released": true, "sources": [ {"kind": "http-parts", "base": "https://huggingface.co/strata-engine/Ling-3.2-Air-Strata/resolve/main"} ] diff --git a/terminal/tests/terminal/test_ling32_launch.py b/terminal/tests/terminal/test_ling32_launch.py index dc55dcbaeb..e6543c34bc 100644 --- a/terminal/tests/terminal/test_ling32_launch.py +++ b/terminal/tests/terminal/test_ling32_launch.py @@ -604,9 +604,10 @@ class FamilyData(unittest.TestCase): got = ling32_family.sources(env={ling32_family.SOURCE_ENV: "https://r2.example/x"}, shipped=f) self.assertEqual([s["base"] for s in got], ["https://r2.example/x", src[0]["base"]]) shipped = _json.loads(ling32_family.SOURCES_FILE.read_text(encoding="utf-8")) - self.assertIs(shipped["released"], False) # the file in the repository is not released + self.assertIs(shipped["released"], True) # 0.2.25: the file in the repository is released self.assertEqual(shipped["sources"][0]["base"], "https://huggingface.co/strata-engine/Ling-3.2-Air-Strata/resolve/main") - self.assertEqual(ling32_family.sources(env={}), []) # so nothing is offered by default + self.assertEqual([s["base"] for s in ling32_family.sources(env={})], [shipped["sources"][0]["base"]]) # so the shipped source is offered by default + self.assertTrue(ling32_family.released()) def test_intel_cards_get_the_chunk_of_their_class_and_no_cuda_tuning_flags(self): # L32-SYCL: the 20 to 44 GiB class (the 32 GB B70) 2048 like everywhere, the 8 to 16 GiB cards (A750, B580) 1024 (the CUDA rule gives them 256: pool slots), no --tc / --graph / --mla-kernel @@ -718,14 +719,17 @@ class FamilyData(unittest.TestCase): self.assertEqual(ling32_family.append_part(j, p, chunk=7), 30) self.assertEqual(j.read_bytes(), b"xyz" * 20) - def test_nothing_is_published_by_default(self): - self.assertEqual(ling32_family.sources(env={}), []) + def test_only_the_shipped_source_is_published_by_default(self): + hf = "https://huggingface.co/strata-engine/Ling-3.2-Air-Strata/resolve/main" + self.assertEqual([s["base"] for s in ling32_family.sources(env={})], [hf]) # released: the one prepared source, and nothing else got = ling32_family.sources(env={"STRATA_LING32_SOURCE": "https://example.invalid/m/"}) + self.assertEqual([s["base"] for s in got], ["https://example.invalid/m", hf]) # a source set by hand comes first + got = got[:1] self.assertEqual(got[0]["base"], "https://example.invalid/m") self.assertEqual(ling32_family.urls_for("Ling-3.2-Air-SQ-96.strata", got[0]), ["https://example.invalid/m/Ling-3.2-Air-SQ-96.strata"]) - self.assertEqual(ling32_family.sources(env={}, cfg={"ling32_source": "ftp://x"}), []) + self.assertEqual([s["base"] for s in ling32_family.sources(env={}, cfg={"ling32_source": "ftp://x"})], [hf]) # a bad configured source adds nothing shipped = (Path(__file__).resolve().parents[2] / "data" / "ling32-sources.json").read_text(encoding="utf-8") - self.assertIn('"released": false', shipped) # the release switch: not released, so the prepared sources are ignored + self.assertIn('"released": true', shipped) # the release switch: released (0.2.25), so the shipped sources are used hf_base = "https://huggingface.co/strata-engine/Ling-3.2-Air-Strata/resolve/main" # the one prepared source: the (private until the release) Hugging Face repo, no key or other host self.assertEqual(shipped.count(hf_base), 1) body = shipped.lower().replace(hf_base.lower(), "").replace('"http-parts"', "").replace('"note"', "")