lllm3090.downloads#
Background model downloads with real progress.
Deliberately a plain HTTP range-resumable GET rather than the HuggingFace client: it gives exact byte counts for the panel’s progress bar, resumes a part file after a cancel or a crash, and keeps a 15 GB download out of the request handler that started it.
- class lllm3090.downloads.Download(id: str, name: str, repo: str, file: str, target: Path, total: int = 0, done: int = 0, state: str = 'queued', detail: str = '', extras: list[str] = <factory>, started: float = <factory>, _cancel: Event = <factory>)[source]#
Bases:
objectState of one in-flight or finished download.
- lllm3090.downloads.start(entry: dict) Download[source]#
Begin downloading a catalogue entry. Returns immediately.
- lllm3090.downloads.resume_interrupted(catalog_entries: list[dict]) list[str][source]#
Restart downloads left half-finished by a panel restart.
Downloads are threads, so stopping the panel – which systemd does on every upgrade – abandons them. The part file survives and the range request resumes from it, but nothing was restarting them, so an interrupted download sat at 83% until someone noticed and pressed the button again.
Returns the ids resumed, for logging.