mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-17 02:05:22 -04:00
A Cookbook download whose repo/quant selector matched no files (e.g. a ':Q4_K_M' tag that does not exist) printed 'Fetching 0 files' and was still reported as a successful '✓ Downloaded' / completed task. Detect the zero-file signature in the download snapshot and mark the task as an error with a clear diagnosis (no matching files — check the repo or quant/filename pattern) so users know nothing was actually downloaded. Normal multi-file and fully-cached downloads (which print 'Fetching N files', N>0) are unaffected. Closes #839
This commit is contained in:
@@ -1898,6 +1898,7 @@ def setup_cookbook_routes() -> APIRouter:
|
|||||||
# persists after the process exits, so a finished download still has a
|
# persists after the process exits, so a finished download still has a
|
||||||
# snapshot to classify (DOWNLOAD_OK / exit marker) — evaluate it even
|
# snapshot to classify (DOWNLOAD_OK / exit marker) — evaluate it even
|
||||||
# when the PID is gone instead of blindly reporting "stopped".
|
# when the PID is gone instead of blindly reporting "stopped".
|
||||||
|
download_zero_files = False
|
||||||
status = "unknown"
|
status = "unknown"
|
||||||
if is_alive or (local_win_task and full_snapshot):
|
if is_alive or (local_win_task and full_snapshot):
|
||||||
lower = full_snapshot.lower()
|
lower = full_snapshot.lower()
|
||||||
@@ -1914,7 +1915,11 @@ def setup_cookbook_routes() -> APIRouter:
|
|||||||
# Only download tasks treat 100% as "completed".
|
# Only download tasks treat 100% as "completed".
|
||||||
# Serve tasks log 100%|██████| during inference progress
|
# Serve tasks log 100%|██████| during inference progress
|
||||||
# (diffusion sampling, etc.) — that's "running", not done.
|
# (diffusion sampling, etc.) — that's "running", not done.
|
||||||
status = "completed"
|
if re.search(r"Fetching\s+0\s+files", full_snapshot, re.IGNORECASE):
|
||||||
|
status = "error"
|
||||||
|
download_zero_files = True
|
||||||
|
else:
|
||||||
|
status = "completed"
|
||||||
elif "application startup complete" in lower:
|
elif "application startup complete" in lower:
|
||||||
status = "ready"
|
status = "ready"
|
||||||
elif not is_alive:
|
elif not is_alive:
|
||||||
@@ -1934,6 +1939,8 @@ def setup_cookbook_routes() -> APIRouter:
|
|||||||
diagnosis = _diagnose_serve_output(full_snapshot) if task_type == "serve" and full_snapshot else None
|
diagnosis = _diagnose_serve_output(full_snapshot) if task_type == "serve" and full_snapshot else None
|
||||||
if diagnosis and status in {"running", "unknown", "stopped"}:
|
if diagnosis and status in {"running", "unknown", "stopped"}:
|
||||||
status = "error"
|
status = "error"
|
||||||
|
if download_zero_files:
|
||||||
|
diagnosis = {"message": "No matching files were downloaded. The model repo or filename/quant pattern may be wrong (for example a ':Q4_K_M' tag that does not exist in the repo). Check the repo and the include/quant pattern."}
|
||||||
output_tail = "\n".join(full_snapshot.splitlines()[-12:]) if full_snapshot else ""
|
output_tail = "\n".join(full_snapshot.splitlines()[-12:]) if full_snapshot else ""
|
||||||
|
|
||||||
results.append({
|
results.append({
|
||||||
|
|||||||
Reference in New Issue
Block a user