From 610d6bb2bed7472d0af743c875b2402ff117762f Mon Sep 17 00:00:00 2001 From: sora <2075279110@qq.com> Date: Mon, 3 Aug 2026 07:14:05 +0000 Subject: [PATCH] fix: set LITELLM_LOCAL_MODEL_COST_MAP=True to avoid GitHub fetch timeout --- bash/case/k3_report_test.py | 8 +++++--- bash/run.py | 5 +++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/bash/case/k3_report_test.py b/bash/case/k3_report_test.py index 195f716..1c04ceb 100644 --- a/bash/case/k3_report_test.py +++ b/bash/case/k3_report_test.py @@ -31,6 +31,9 @@ import subprocess import sys from pathlib import Path +# 避免 LiteLLM 联网拉取 model cost map 导致超时 +os.environ.setdefault('LITELLM_LOCAL_MODEL_COST_MAP', 'True') + def _find_repo_root() -> Path: """向上查找,直到目录下存在 bash/run.py。""" p = Path(__file__).resolve().parent @@ -44,9 +47,8 @@ def _find_repo_root() -> Path: ROOT = _find_repo_root() -# --------------------------------------------------------------------------- -# Kimi K3 report -> evalscope dataset 映射 -# --------------------------------------------------------------------------- +deep_swe, + BENCHMARKS = { "Coding": [ { diff --git a/bash/run.py b/bash/run.py index ee3f914..d66a1f9 100644 --- a/bash/run.py +++ b/bash/run.py @@ -30,12 +30,17 @@ Examples: import argparse import json +import os import sys import threading import time from copy import deepcopy from pathlib import Path +# LiteLLM 默认会联网拉取 GitHub 上的 model cost map,内网/无网环境会超时。 +# 强制使用本地备份,避免运行时被卡住。 +os.environ.setdefault('LITELLM_LOCAL_MODEL_COST_MAP', 'True') + import yaml from evalscope import run_task, TaskConfig