Support official semantic llama.cpp releases and document prefill comparison

This commit is contained in:
Mikei386
2026-09-28 22:24:44 +02:00
parent 6255f0b8ea
commit 682211e6a9
5 changed files with 30 additions and 5 deletions
+4 -2
View File
@@ -16,6 +16,8 @@ class RuntimeTests(unittest.TestCase):
r=Runtime(d)
with patch.object(r,'prerequisites',return_value={'cuda_ready':False}),patch('runtime.subprocess.Popen') as spawn:
with self.assertRaises(ValueError):r.start('b9000')
with self.assertRaises(ValueError):r.start('v0.5.0')
self.assertEqual(r.prerequisites.call_count,2)
spawn.assert_not_called()
def test_selection_rollback_persistence(self):
with tempfile.TemporaryDirectory() as d:
@@ -42,8 +44,8 @@ class RuntimeTests(unittest.TestCase):
with self.assertRaises(ValueError):r.fit('medium',160000,2)
def test_official_prereleases_are_not_hidden(self):
row=dict(tag_name='b11229',name='build',published_at='date',body='notes',html_url='https://github.com/ggml-org/llama.cpp/releases',prerelease=True,draft=False)
with tempfile.TemporaryDirectory() as d,patch('runtime.github',return_value=[row]):
self.assertTrue(Runtime(d).releases()['releases'][0]['prerelease'])
with tempfile.TemporaryDirectory() as d,patch('runtime.github',side_effect=[[row],dict(row,tag_name='v0.5.0',prerelease=False)]):
releases=Runtime(d).releases()['releases'];self.assertEqual(releases[0]['tag'],'v0.5.0');self.assertTrue(releases[1]['prerelease'])
def test_fit_excludes_busy_gpu_and_preserves_context(self):
with tempfile.TemporaryDirectory() as d:
r=Runtime(d);r.state.update(active='build',builds=[dict(id='build',backend='CUDA',fit_tool=True)])