mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 23:08:36 +00:00
Ling-3.2-Air is released in 0.2.25: ling32-sources.json "released": true
The one word data/ling32-sources.json "released" is the whole release switch: strata_control/ling32_family.py released() / sources() read it; setup.py (CLI and TUI model menu) and tools/strata_mcp.py ling32_visible() (the model list the app takes from Control) test `released() or sources()`; app/host has no switch of its own. True puts Ling-3.2-Air in every model list and makes the shipped Hugging Face source count (the repo has to be public from the first build that ships this). - terminal/data/ling32-sources.json: released true, the note says what true and false do. - test_ling32_launch.py: the shipped file is released, the shipped source is offered by default, a source set by hand still comes first, a bad configured source adds nothing. - The config snapshot goldens (tests/snapshot) are unchanged: regenerating them with the switch flipped rewrote nothing, and the whole tests/snapshot directory passes.
This commit is contained in:
1 parent
08ed878b45
commit
28c83e7548
2 files changed
+12
-8
No files matched your search
@@ -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"}
|
||||
]
|
||||
|
||||
@@ -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"', "")
|
||||
|
||||
Reference in new issue
Block a user