Skip to content

Conversation

@majiayu000
Copy link

Summary

  • Add enable_warmup parameter to HNSW and DiskANN embedding servers to pre-load model at startup
  • Implement warmup() method on LeannSearcher for manual pre-warming before first search
  • Add auto-warmup option during LeannSearcher initialization (enable_warmup=True)
  • Model warmup is done via dummy embedding computation, ensuring cache is hot
  • Add comprehensive tests for warmup functionality

Test Plan

  • Added unit tests in tests/test_warmup.py
  • Tests cover warmup method, auto-warmup, server parameter passing
  • All Python files pass syntax validation

Fixes #177
Fixes #159

- Add enable_warmup parameter to HNSW and DiskANN embedding servers
- Implement warmup() method on LeannSearcher for manual pre-warming
- Auto-warmup option during LeannSearcher initialization (enable_warmup=True)
- Pre-load embedding model at server startup to avoid cold-start latency
- Add comprehensive tests for warmup functionality

Fixes yichuan-w#177 (search recompute latency)
Fixes yichuan-w#159 (warmup strategy)
@yichuan-w yichuan-w requested a review from andylizf December 24, 2025 08:43
@yichuan-w
Copy link
Owner

yichuan-w commented Dec 24, 2025

Thanks, this is a known issue for a long time, we will look into that!! cc @andylizf , and can you fix the lint error here?

- Remove unused imports (tempfile, Path, MagicMock)
- Fix import order (stdlib before third-party)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@majiayu000
Copy link
Author

The macOS-13 CI jobs show as 'cancelled' rather than 'failed' - this appears to be a GitHub Actions runner issue, not a code problem. All other builds (macos-14, macos-15, ubuntu) passed successfully.

Could you please re-run the cancelled macOS-13 jobs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants