okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

Niko1221Version 0.2.10 / engine 0.1.56 follow-through: test_tui2_023_versions and AGENTS.md follow the bump; the '0.2.9.1' tags that meant this release now read 0.2.10; the test comment names 0.2.9.1 as the unpublished DeepSeek hotfix labelf31abf7bd

main
1.5 KiB37 linesraw
1"""0.2.10: UD-Q4_K_XL on a Strix Halo is warned about (warn only). Remove with the stall fix."""
2
3from __future__ import annotations
4
5import tempfile
6import unittest
7from pathlib import Path
8from unittest import mock
9
10from strata_control import gpu_fit
11
12NV = {"vendor": "nvidia", "name": "NVIDIA GeForce RTX 5060", "vram_gb": 8.0, "usable": True, "index": 0}
13
14
15class StrixQ4(unittest.TestCase):
16    STRIX = {"vendor": "amd", "name": "AMD Radeon 8060S", "arch": "gfx1151", "vram_gb": 96.0}
17
18    def test_warns_for_the_one_model_on_the_one_chip_and_never_otherwise(self):
19        note = gpu_fit.strix_q4_stall_note("ud-q4_k_xl", [self.STRIX])
20        self.assertIn("7 of 30", note)
21        self.assertIn("UD-IQ4_XS", note)
22        self.assertIsNone(gpu_fit.strix_q4_stall_note("UD-IQ4_XS", [self.STRIX]))
23        self.assertIsNone(gpu_fit.strix_q4_stall_note("UD-Q4_K_XL", [NV]))
24        self.assertIsNone(gpu_fit.strix_q4_stall_note(None, None))
25
26    def test_the_launch_notice(self):
27        from strata_cli.launch import cmd, settings as S
28        from tests.terminal.launch_support import HW_12, Home, catalog
29        with Home():
30            cat = catalog({**HW_12, "gpus": [self.STRIX]})
31            s, notes = cmd.apply_defaults(S.LaunchSettings(family="qwen", model="UD-Q4_K_XL"), cat)
32            self.assertTrue([n for n in notes if "7 of 30" in n.text], [n.text for n in notes])
33            self.assertTrue(all(n.level == "warn" for n in notes if "7 of 30" in n.text))
34
35
36if __name__ == "__main__":
37    unittest.main()