fix(logging): suppress faiss AVX2/AVX-512 fallback noise#1222
Conversation
faiss-cpu's loader tries swigfaiss_avx512 → swigfaiss_avx2 → swigfaiss and logs each failed attempt at INFO, producing 6 lines that look like errors to users. On PyPI wheels that ship only the generic SWIG module (common on Linux), this made users think faiss was broken and was the cause of slow responses — when the actual bottleneck is LLM inference. Adds a log filter (same pattern as the existing aiohttp/httpx/datasets/ phonemizer filters) that suppresses the noisy fallback messages, and replaces them with a single summary line in the server boot sequence that names the optimization level actually loaded.
6172ac2 to
b9ee8ee
Compare
|
@claude review this PR |
|
Clean, targeted DX fix that eliminates 6 alarming-looking startup lines and replaces them with a single informative summary. Follows the established Issues🟢 Minor — dead variable
|
|
Reviewed — this is clean and the core correctness concern (timing) holds up. Looks good to merge with a couple of minor notes below. The thing that could have broken this is import ordering: The filter substrings ( 🟢 Two minor things, neither blocking:
Nice fix — the "users blame faiss for Gemma-4 inference latency" framing is a real support-noise win. |
|
Solid, minimal fix that follows the established SummaryThe change correctly slots Issues Found🟢 Minor — Docstring exceeds CLAUDE.md's "one short line" rule (
|
Users on Linux (especially Arch/CachyOS via the npm install path) see 6 alarming-looking INFO lines from faiss.loader at startup — "Could not load library with AVX512 support", "Could not load library with AVX2 support" — and blame faiss for 50-second response times that are actually LLM inference on Gemma-4. The noise trains users to file the wrong bug. Adds a `filter_faiss_loader` log filter (same pattern as the existing aiohttp/httpx/datasets/phonemizer suppressions in `GaiaLogger`) and replaces the 6 lines with a single summary in the server boot sequence that names the SWIG backend actually loaded. ## Test plan - [ ] `pytest tests/unit/test_faiss_log_filter.py -xvs` — 10 tests covering every message variant (suppress attempts/failures, keep success/unrelated) - [ ] Start Agent UI (`gaia chat --ui`), confirm logs show one `faiss: loaded (generic …)` line instead of 6 noisy fallback messages - [ ] On a system with AVX2 faiss wheel, confirm log shows `faiss: loaded with AVX2 support` --------- Co-authored-by: Ovtcharov <kovtchar@amd.com>
Users on Linux (especially Arch/CachyOS via the npm install path) see 6 alarming-looking INFO lines from faiss.loader at startup — "Could not load library with AVX512 support", "Could not load library with AVX2 support" — and blame faiss for 50-second response times that are actually LLM inference on Gemma-4. The noise trains users to file the wrong bug.
Adds a
filter_faiss_loaderlog filter (same pattern as the existing aiohttp/httpx/datasets/phonemizer suppressions inGaiaLogger) and replaces the 6 lines with a single summary in the server boot sequence that names the SWIG backend actually loaded.Test plan
pytest tests/unit/test_faiss_log_filter.py -xvs— 10 tests covering every message variant (suppress attempts/failures, keep success/unrelated)gaia chat --ui), confirm logs show onefaiss: loaded (generic …)line instead of 6 noisy fallback messagesfaiss: loaded with AVX2 support