Issue 1959 [PERFORMANCE]: Fix critical performance issues in llm-guard plugin#2200
Issue 1959 [PERFORMANCE]: Fix critical performance issues in llm-guard plugin#2200crivetimihai merged 1 commit intoIBM:mainfrom
Conversation
|
Analysis: |
…scanners - Convert cache.py to use async redis (redis.asyncio) for non-blocking I/O - Add parallel scanner execution using asyncio.gather in input/output filters - Add asyncio.to_thread for CPU-bound scanner operations - Quiet llm_guard logger to ERROR level to reduce noise - Fix tests to use prompt_id instead of deprecated name parameter - Update test to use environment variables for redis host/port Security: Scanner errors now fail-closed (is_valid=False) instead of being skipped, ensuring policy evaluation denies requests when scanners fail. Closes IBM#1959 Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
3e86ce2 to
ab68403
Compare
Rebase and Review SummaryI've rebased this PR onto main and made the following adjustments: Changes Made During Rebase
Remaining Questions
Files Changed
|
…scanners (IBM#2200) - Convert cache.py to use async redis (redis.asyncio) for non-blocking I/O - Add parallel scanner execution using asyncio.gather in input/output filters - Add asyncio.to_thread for CPU-bound scanner operations - Quiet llm_guard logger to ERROR level to reduce noise - Fix tests to use prompt_id instead of deprecated name parameter - Update test to use environment variables for redis host/port Security: Scanner errors now fail-closed (is_valid=False) instead of being skipped, ensuring policy evaluation denies requests when scanners fail. Closes IBM#1959 Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
🐛 Bug-fix PR
Before opening this PR please:
make lint- passesruff,mypy,pylintmake test- all unit + integration tests greenmake coverage- ≥ 90 %make docker docker-run-sslormake podman podman-run-ssl📌 Summary
#1959
🔁 Reproduction Steps
LOG_LEVEL=ERROR
python tests/performance/test_plugins_performance.py --details 2> /dev/null
🐞 Root Cause
#1959
💡 Fix Description
prescriptively followed details in epic #1958
🧪 Verification
LOG_LEVEL=ERROR
python tests/performance/test_plugins_performance.py --details 2> /dev/null
✅ Checklist
make black isort pre-commit)