Skip to content

API Reference parrot.utils.faiss_logging

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.utils.faiss_logging

View source

Quiet FAISS's own import-time boot chatter.

FAISS logs through its faiss.loader logger the first time import faiss runs in a process — probing the CPU instruction set and reporting which shared library it loaded::

[DEBUG] faiss.loader :: Environment variable FAISS_OPT_LEVEL is not set ...
[INFO]  faiss.loader :: Loading faiss with AVX2 support.
[INFO]  faiss.loader :: Could not load library with AVX2 support due to: ...
[INFO]  faiss.loader :: Loading faiss.
[INFO]  faiss.loader :: Successfully loaded faiss.

These are emitted once at first import and carry no actionable information for AI-Parrot users. quiet_faiss_loader raises the faiss logger family to WARNING so only genuine problems surface. Because Python loggers are singletons by name, setting the level here persists even though FAISS creates the logger at import time — call this BEFORE the first import faiss and the boot lines are suppressed for the whole process.

Override via the FAISS_LOG_LEVEL environment variable (e.g. INFO to restore the full boot chatter, DEBUG, or a numeric level).

Function quiet_faiss_loader

Raise the faiss logger to WARNING (or FAISS_LOG_LEVEL). Idempotent.

Safe to call repeatedly and from multiple import sites — the first call before import faiss wins; later calls just re-assert the same level.

quiet_faiss_loader() -> None

Alias resolve_log_level

Re-exported from parrot.utils.log_levels.resolve_log_level.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally