Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions scripts/fetch-hf-dates.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ async function fetchCreatedAt(modelId) {
try {
const res = await fetch(`https://huggingface.co/api/models/${modelId}`, {
headers: { "User-Agent": "vllm-recipes-build/1.0" },
signal: AbortSignal.timeout(10000),
});
if (!res.ok) return null;
const data = await res.json();
Expand Down
5 changes: 4 additions & 1 deletion scripts/fetch-provider-logos.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ fs.mkdirSync(OUT, { recursive: true });
async function fetchOrgAvatarUrl(org) {
const res = await fetch(`https://huggingface.co/${org}`, {
headers: { "User-Agent": "vllm-recipes-build/1.0" },
signal: AbortSignal.timeout(10000),
});
const html = await res.text();
const match = html.match(/cdn-avatars\.huggingface\.co\/[^"&]+/);
Expand Down Expand Up @@ -58,7 +59,9 @@ for (const [org, meta] of Object.entries(targets)) {
failed++;
continue;
}
const imgRes = await fetch(avatarUrl);
const imgRes = await fetch(avatarUrl, {
signal: AbortSignal.timeout(10000),
});
const buffer = Buffer.from(await imgRes.arrayBuffer());
fs.writeFileSync(localPath, buffer);
console.log(`✓ ${org} (${buffer.length}B)`);
Expand Down