- Delete any model (incl. failed ones); the worker removes the repo's files (keeps foreign files and empty-folder cleanup), then the rows. - Verify (existence, size, hf metadata) and deep verify (SHA-256 / git blob SHA-1 against the Hub) with missing/mismatch/extra report. - Repair = download of the selection; broken files are deleted first because hf skips files whose metadata matches without checking them. - Hub check resolves the tracked revision and stores which selected files a newer commit changes/adds/removes; Update pins it (old commit kept in model_revisions), downloads, then removes dropped files. - Worker runs verify/delete jobs next to downloads (2 local slots). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
17 lines
563 B
TypeScript
17 lines
563 B
TypeScript
// Human-readable job names (shared by UI components).
|
|
|
|
const DOWNLOAD_PURPOSE: Record<string, string> = {
|
|
initial: "Download",
|
|
add: "Download more",
|
|
import: "Import",
|
|
repair: "Repair",
|
|
update: "Update",
|
|
};
|
|
|
|
const KIND: Record<string, string> = { download: "Download", verify: "Verify", deep_verify: "Deep verify", delete: "Delete" };
|
|
|
|
export function jobLabel(job: { kind: string; purpose: string | null }): string {
|
|
if (job.kind === "download") return DOWNLOAD_PURPOSE[job.purpose ?? "initial"] ?? "Download";
|
|
return KIND[job.kind] ?? job.kind;
|
|
}
|