feat(retrieval): preload Qwen models during setup
CI / Capabilities and shell quality (push) Successful in 11s
CI / Python tests and compilation (push) Successful in 11s
CI / PowerShell tests on Ubuntu (push) Successful in 28s
CI / CI configuration security checks (push) Successful in 3s
CI / Build and inspect generated packages (push) Successful in 6s
CI / Qwen retrieval integration (push) Successful in 14m20s
CI / Bash integration and installation guards (push) Successful in 16s
CI / Installed client configuration smoke tests (push) Successful in 13s

This commit is contained in:
fraujulian committed 2026-09-18 15:47:42 +02:00
1 parent b5123df02a
commit 49be8edbec
4 files changed
+60 -3

No files matched your search

+8
View File
@@ -10,6 +10,7 @@ import sys
FILES = ('server.py', 'benchmark.py', 'requirements.txt')
CUDA_INDEX = 'https://download.pytorch.org/whl/cu126'
MODEL_PRELOAD_TIMEOUT = 900
def digest(path):
@@ -41,6 +42,11 @@ def ensure_runtime(target, dry_run):
return python
def ensure_models(python, target):
subprocess.run([str(python), str(target / 'server.py'), 'preload', '--model-cache', str(target / 'model-cache')],
check=True, timeout=MODEL_PRELOAD_TIMEOUT)
def load_state(path):
if not path.exists():
return {'version': 1, 'clients': [], 'files': {}}
@@ -96,7 +102,9 @@ def sync(root, home, clients, enabled, dry_run, update, summary=False):
for name in FILES:
shutil.copy2(source / name, target / name)
state['files'][name] = digest(target / name)
save_state(state_path, state, False)
python = ensure_runtime(target, False)
ensure_models(python, target)
state['clients'] = list(dict.fromkeys(state['clients']))
save_state(state_path, state, False)
for client in clients: