Skip to content

Conversation

@majiayu000
Copy link

Summary

  • Adds --verbose/-v and --quiet/-q flags to control C++ backend output
  • Default behavior is quiet (suppresses C++ logs from FAISS/HNSW)
  • Use --verbose to show detailed logs for debugging

Fixes #187

Test plan

  • Added 11 new tests in tests/test_cli_verbosity.py
  • Tests verify fd redirection works correctly
  • Tests verify argument parsing for verbose/quiet flags
  • Tests verify mutual exclusivity of verbose/quiet
  • All new tests pass locally

majiayu000 and others added 2 commits December 25, 2025 12:02
Fixes yichuan-w#187

Adds --verbose/-v and --quiet/-q flags to control C++ backend output:
- Default behavior is quiet (suppresses C++ logs)
- Use --verbose to show detailed FAISS/HNSW logs for debugging

Implementation:
- Add suppress_cpp_output() context manager that redirects fd 1/2
- Add global verbosity flags to main argument parser
- Apply suppression to build, search, and ask commands
- Add comprehensive tests for the new functionality

Signed-off-by: majiayu000 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement configurable verbosity for FAISS / HNSW

2 participants