diff --git a/pyproject.toml b/pyproject.toml index e4ac944..d4ca075 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,12 +38,18 @@ dependencies = [ "requests>=2.31.0", "httpx>=0.27.0", "psutil>=5.9.0", - "gguf>=0.19.0", "fastapi>=0.110.0", "uvicorn>=0.28.0", ] [project.optional-dependencies] +# gguf нужен только стенду замеров (benchmarks/run_benchmark.py) и не +# импортируется продуктом. В основных зависимостях он заставлял каждую +# установку хаба тянуть библиотеку разбора GGUF. +benchmarks = [ + "gguf>=0.19.0", +] + dev = [ "pytest>=8.0.0", "pytest-asyncio>=0.23.0", diff --git a/tests/test_a40_model_benchmark.py b/tests/test_a40_model_benchmark.py index fdf73f9..66f0432 100644 --- a/tests/test_a40_model_benchmark.py +++ b/tests/test_a40_model_benchmark.py @@ -10,6 +10,10 @@ import pytest sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) from benchmarks.benchmark_suite import BENCHMARK_TASKS, _compile_and_get +# gguf — зависимость только стенда замеров. На машине без неё модуль +# ронял СБОР всех тестов, а не один этот файл. +pytest.importorskip("gguf", reason="gguf ставится дополнением benchmarks") + from benchmarks.run_benchmark import get_gguf_metadata