From 088791d4338da38d8c948f9c681a68baeb84705f Mon Sep 17 00:00:00 2001 From: gufengc Date: Sat, 11 Oct 2025 18:11:12 +0800 Subject: [PATCH 1/2] fix(scheduler): Fix not read model config from cache --- src/backend/server/static_config.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/backend/server/static_config.py b/src/backend/server/static_config.py index b03f833b..33ee91e8 100644 --- a/src/backend/server/static_config.py +++ b/src/backend/server/static_config.py @@ -1,6 +1,4 @@ -import json - -from huggingface_hub import hf_hub_download +from mlx_lm.utils import get_model_path, load_config from scheduling.model_info import ModelInfo @@ -42,10 +40,8 @@ def get_model_info(model_name): - config_path = hf_hub_download(repo_id=model_name, filename="config.json") - with open(config_path, "r") as f: - config = json.load(f) - f.close() + model_path = get_model_path(model_name)[0] + config = load_config(model_path) # get quant method quant_method = config.get("quant_method", None) From 4fba7a8d0b5f42eb97ba1a810922ccd566823071 Mon Sep 17 00:00:00 2001 From: gufengc Date: Sat, 11 Oct 2025 18:17:09 +0800 Subject: [PATCH 2/2] update --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f6164942..2fcaec5d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,6 @@ dependencies = [ "pydantic", "protobuf==6.31.1", "dijkstar==2.6.0", - "huggingface-hub", "lattica==1.0.3", ]