Rerank recursive#72
Conversation
Introduces environment variables, volumes, and a new 'learning_worker' service for learning reranker functionality. Shared volumes for reranker weights and events are added, and relevant configuration is applied to affected services to enable training and event processing.
Set permissions for /tmp/rerank_events and /tmp/rerank_weights in Dockerfiles to allow non-root container access. Updated rerank_recursive.py to support both local and Docker import paths for log_training_event.
Expanded ARCHITECTURE.md with a detailed section on the Learning Reranker system, including its architecture, components, learning flow, configuration, observability, and benefits. Updated CONFIGURATION.md to document environment variables and settings related to the Learning Reranker, covering weight management, learning rate, event logging, and worker configuration.
Clarified that the learning reranker system is optional and enabled by default. Added instructions and environment variables for disabling the feature in CONFIGURATION.md, and updated ARCHITECTURE.md to reference these options.
| # On first mount of an empty named volume, Docker copies directory contents (incl perms) | ||
| # from the image into the volume. | ||
| RUN mkdir -p /tmp/rerank_events /tmp/rerank_weights \ | ||
| && chmod 777 /tmp/rerank_events /tmp/rerank_weights |
There was a problem hiding this comment.
chmod 777 makes these directories world-writable; consider using least-privilege ownership/permissions for uid 1000 instead (also applies to Dockerfile.mcp).
🤖 Was this useful? React with 👍 or 👎
| | RERANKER_TOKENIZER_PATH | Tokenizer path for reranker | unset | | ||
| | RERANKER_ENABLED | Enable reranker by default | 1 (enabled) | | ||
|
|
||
| ## Learning Reranker |
There was a problem hiding this comment.
This section introduces the learning reranker, but the serving path is gated by RERANK_LEARNING (and docker-compose.yml sets it); consider documenting this toggle so users can disable learning without disabling reranking entirely.
🤖 Was this useful? React with 👍 or 👎
| | Name | Description | Default | | ||
| |------|-------------|---------| | ||
| | RERANK_EVENTS_DIR | Directory for search event logs | /tmp/rerank_events | | ||
| | RERANK_EVENTS_RETENTION_DAYS | Days to keep event files before cleanup | 7 | |
There was a problem hiding this comment.
Docs list RERANK_EVENTS_RETENTION_DAYS default as 7, but scripts/rerank_events.py currently defaults it to 0 (keep forever); aligning these would avoid confusion (also applies to docs/ARCHITECTURE.md).
🤖 Was this useful? React with 👍 or 👎
No description provided.