Add SSD-backed Flash-Next endpoint profile and benchmark evidence
This commit is contained in:
1 parent
c15dfad35c
commit
95cf2d9fd5
59 files changed
+9971
-7
No files matched your search
@@ -75,6 +75,19 @@ class WorkerTests(unittest.TestCase):
|
||||
from inference import MemoryAdmissionError
|
||||
with self.assertRaisesRegex(MemoryAdmissionError,'Vollständige GPU'):self.worker.ensure(self.profile)
|
||||
launch.assert_not_called();self.assertEqual(fit.call_count,1)
|
||||
def test_disk_streaming_preserves_upstream_expert_fit(self):
|
||||
self.entry['runtime_metadata']={'architecture':'qwen4exp'}
|
||||
self.profile['parameters'].update(load_mode='mmap',tensor_split=[],mtp=False)
|
||||
process=Mock();process.poll.return_value=None;http=Mock();http.getresponse.return_value.status=200
|
||||
with self.patches(),patch('inference.probe',return_value=self.gpus),patch('inference.cgroup_headroom',return_value=40*1024**3),patch.object(self.worker,'_fit_command') as fit,patch('inference.subprocess.Popen',return_value=process) as launch,patch('inference.http.client.HTTPConnection',return_value=http),patch('inference.threading.Thread'):
|
||||
self.worker.ensure(self.profile)
|
||||
args=launch.call_args.args[0];fit.assert_not_called()
|
||||
self.assertEqual(args[args.index('--fit')+1],'on');self.assertEqual(args[args.index('--load-mode')+1],'mmap');self.assertIn('--lazy-mode',args);self.assertNotIn('--gpu-layers',args)
|
||||
self.assertFalse(self.worker.memory_plan['full_gpu']);self.assertFalse(self.worker.memory_plan['estimated'])
|
||||
def test_disk_streaming_rejects_other_architecture(self):
|
||||
self.profile['parameters'].update(load_mode='mmap',tensor_split=[])
|
||||
with self.patches(),patch('inference.probe',return_value=self.gpus):
|
||||
with self.assertRaises(InferenceError):self.worker.plan(self.profile)
|
||||
def test_build_symlink_cannot_escape_deck_state(self):
|
||||
self.runtime.status=lambda:dict(active='outside',builds=[dict(id='outside',backend='CUDA',fit_tool=True)])
|
||||
(self.root/'runtime'/'outside').symlink_to('/usr')
|
||||
|
||||
Reference in new issue
Block a user