Skip to content

Commit c00506c

Browse files
committed
remove logs + auth if no auth
1 parent c2fb73b commit c00506c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/inference-providers/scripts/generate.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ const TASKS: PipelineType[] = [
2929
const TASKS_EXTENDED = [...TASKS, "chat-completion"];
3030
const SPECS_REVISION = "main";
3131

32-
const HEADERS = { Authorization: `Bearer ${process.env.HF_TOKEN}` };
32+
const HEADERS: Record<string, string> = process.env.HF_TOKEN
33+
? { Authorization: `Bearer ${process.env.HF_TOKEN}` }
34+
: {};
3335

3436
const PROVIDERS_HUB_ORGS: Record<string, string> = {
3537
cerebras: "cerebras",
@@ -510,12 +512,10 @@ async function fetchWarmModels(
510512
inferenceProviderMapping: Record<string, string>[];
511513
tags: string[];
512514
}[];
513-
if (modelsData.length === 0 || modelsData[0] === undefined) {
515+
if (modelsData.length === 0) {
514516
console.warn(
515517
` ⚠️ No warm model found for ${task} from ${provider}`
516518
);
517-
console.log(modelsData);
518-
console.log("cancel early");
519519
return;
520520
}
521521

0 commit comments

Comments
 (0)