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: object

State of one in-flight or finished 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]#

Files that belong with the weights – a multimodal projector. Fetched after them, into the same directory, under the same cancel flag.

started: float#
property percent: float#
property rate_mib_s: float#
as_dict() dict[source]#
lllm3090.downloads.url_for(repo: str, file: str) str[source]#
lllm3090.downloads.start(entry: dict) Download[source]#

Begin downloading a catalogue entry. Returns immediately.

lllm3090.downloads.cancel(model_id: str) bool[source]#
lllm3090.downloads.all_downloads() list[dict][source]#
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.