Commit Graph
100 Commits
Author SHA1 Message Date
Andy Lee 74d485c908 fix: remove Chinese comments from code
- Replace all Chinese comments with English
- Ensure code is internationalization-friendly
2025-07-25 12:55:28 -07:00
Andy Lee d1fefb6378 fix: correct DiskANN subdirectory path
- Change from src/third_party/DiskANN to third_party/DiskANN
- This was causing CMake to fail finding the subdirectory
2025-07-25 12:51:47 -07:00
Andy Lee 732384f4f8 fix: improve Python finding for DiskANN in manylinux environment
- Add explicit Python finding logic to DiskANN CMakeLists.txt
- Change Development to Development.Module to avoid Embed requirement
- Pass Python variables through CMake cache to submodules
2025-07-25 12:22:27 -07:00
Andy Lee ae38e10d1b chore: focus on Linux builds for Colab compatibility
- Remove macOS from build matrix to simplify CI
- Keep macOS configurations for future reference but they won't be used
- This speeds up CI and focuses on the primary target (Colab/Linux)
2025-07-25 12:20:32 -07:00
Andy Lee ca0fd88934 chore: clean up temporary test scripts 2025-07-25 11:53:23 -07:00
Andy Lee 3c8d32f156 fix: prevent pyzmq compilation during tests
- Cap pyzmq version to <27 for manylinux2014 compatibility
- Pre-install pyzmq binary wheel before tests using CIBW_BEFORE_TEST
- Force pip to use only binary wheels with --only-binary :all:
2025-07-25 11:35:31 -07:00
Andy Lee b8ff00fc6a fix: address macOS deployment target and pyzmq compilation issues
- Set MACOSX_DEPLOYMENT_TARGET=11.0 for macOS builds
- Add pyzmq to test requirements to use pre-built wheels
- Configure deployment target in both workflow and pyproject.toml
- Skip ARM64 tests on GitHub Actions to avoid cross-compilation issues
2025-07-25 11:13:51 -07:00
Andy Lee 3c836766f8 fix: update faiss submodule to fix-python-finding-manylinux branch 2025-07-25 10:55:28 -07:00
Andy Lee b4a1dfb9c7 fix: update faiss submodule pointer with Python finding fixes 2025-07-25 10:53:05 -07:00
Andy Lee a4d66e95d8 fix: improve Python finding for Faiss in manylinux environment
- Use Development.Module instead of Development component
- Find Python in main Faiss CMakeLists.txt before python subdirectory
- Add debug output to trace Python variable passing
- Set Python_FIND_VIRTUALENV=ONLY for Faiss
2025-07-25 10:52:34 -07:00
Andy Lee cf58b3e31b fix: re-enable Faiss Python bindings and improve Python finding
- Re-enable FAISS_ENABLE_PYTHON since we need the Python bindings
- Use Development.Module component for better compatibility
- Pass Python information to Faiss through CMake cache variables
- Add CMAKE_PREFIX_PATH= to help CMake find Python in manylinux
2025-07-25 10:45:07 -07:00
Andy Lee e9c2ca7936 fix: remove cmake.verbose from scikit-build config
- cmake.verbose is not allowed when minimum-version is set to 0.10 or higher
- This was causing build failures in cibuildwheel
2025-07-25 10:37:06 -07:00
Andy Lee dab154a77b fix: disable Faiss Python bindings to avoid CMake Python finding issues
- Set FAISS_ENABLE_PYTHON to OFF since we use our own Cython bindings
- This avoids the CMake Python finding issues in manylinux environments
- Simplify CMakeLists.txt by removing unnecessary Python finding logic
- Keep swig installation for other potential uses
2025-07-25 10:33:31 -07:00
Andy Lee 13413dfae5 fix: improve Python detection in manylinux environment
- Modify faiss CMakeLists.txt to try both FindPython and FindPython3
- Add scikit-build configuration to help with Python detection
- Simplify Linux environment variables in cibuildwheel
- Add CMake Python detection before faiss configuration
2025-07-25 10:27:04 -07:00
Andy Lee 0543cc9816 fix: add missing dependencies for CI builds
- Add libomp for macOS to fix OpenMP linking error
- Add python3-devel for Linux (though may not be needed in manylinux)
- Install numpy before building to satisfy faiss CMake requirements
- Add before-build configuration to cibuildwheel
2025-07-25 10:20:02 -07:00
Andy Lee fb53ed9a0e fix: use manylinux2014 for Colab compatibility
- Switch from manylinux_2_28 to manylinux2014 (provides manylinux_2_17)
- This should produce wheels compatible with manylinux_2_35_x86_64 requirement
- Update package manager from dnf to yum for CentOS 7
- Use cmake3 with symlink for compatibility
2025-07-25 10:15:05 -07:00
Andy Lee 015f43733a fix: adjust configuration for Colab compatibility
- Remove Windows support as not needed
- Move Python finding hints to cibuildwheel environment variables
- Keep pyproject.toml clean to avoid breaking normal builds
- Target manylinux_2_28 for better Colab compatibility
2025-07-25 10:09:21 -07:00
Andy Lee 2957c8bf5a docs: add manylinux build strategy documentation 2025-07-25 10:03:57 -07:00
Andy Lee a73194c3f6 feat: simplify build using cibuildwheel with standard configuration
- Add Python_FIND_VIRTUALENV hints to pyproject.toml for CMake
- Create standardized cibuildwheel workflow using manylinux_2_28
- Simplify system dependency installation
- Add global cibuildwheel configuration in root pyproject.toml
- Create streamlined test workflow for manylinux compatibility
2025-07-25 10:03:23 -07:00
Andy Lee 5eb893c62b ci: add Python 3.13 support to build matrix 2025-07-25 09:53:36 -07:00
Andy Lee 48c5e12ac1 fix: use absolute path for passages_file to prevent FileNotFoundError
When embedding server is launched as a subprocess, it may run in a different
working directory. Using absolute paths ensures the server can always find
the metadata file regardless of where it's launched from.
2025-07-25 01:23:47 -07:00
Andy Lee 29cbbbd0d6 fix: resolve libzmq pkg-config issues in manylinux containers
- Add gcc-c++ and cmake to dependencies
- Create libzmq.pc file if missing (CentOS 7 issue)
- Set PKG_CONFIG_PATH through CIBW_ENVIRONMENT_LINUX
- Add protobuf-devel to ensure all headers are available
- Fix shell variable escaping in heredoc
2025-07-25 00:35:52 -07:00
Andy Lee 179f30bc36 fix: improve system dependency installation in manylinux containers
- Add yum cache cleaning and updating
- Make package installations more resilient with fallbacks
- Use pkgconfig instead of pkg-config (CentOS 7 naming)
- Handle optional packages that might not be available
- Add error handling for package installation failures
2025-07-25 00:30:29 -07:00
Andy Lee c4a0a68581 fix: handle pure Python packages in cibuildwheel workflow
- Build pure Python packages (leann-core, leann) with standard build tool
- Only use cibuildwheel for C extension packages (leann-backend-hnsw, leann-backend-diskann)
- Build pure Python packages only once on ubuntu-latest
- Add Python setup for building pure packages
- Add package listing step for debugging
2025-07-25 00:26:15 -07:00
Andy Lee 5c836ad08e fix: handle git dubious ownership error in manylinux containers
- Add multiple safe.directory configurations to cover different possible paths
- This fixes 'detected dubious ownership in repository' error
- Ensures git works properly in manylinux2014 containers
2025-07-25 00:22:01 -07:00
Andy Lee 673fd9b7cd fix: upgrade to actions v4 and handle manylinux2014 compatibility
- Upgrade all GitHub Actions to v4 (v3 is deprecated)
- Use manual git checkout in manylinux2014 containers to avoid Node.js issues
- Update artifact naming to ensure uniqueness (required by v4)
- Add fail-fast: false to build strategies
- This maintains manylinux2014 compatibility while using latest actions
2025-07-25 00:20:21 -07:00
Andy Lee 84b24b233d feat: add cibuildwheel option to release workflow
- Add optional use_cibuildwheel parameter to release workflow
- Create separate CI workflow for testing cibuildwheel
- Support conditional build workflow selection in release process
- This allows building wheels compatible with Google Colab and older systems
- Maintains backward compatibility with existing build process
2025-07-25 00:16:08 -07:00
Andy Lee 499cdd7822 feat: add cibuildwheel workflow for better platform compatibility
- Use cibuildwheel for professional wheel building
- Specifically use manylinux2014 for Google Colab compatibility
- Supports Python 3.9-3.12 on Linux and macOS
- Handles monorepo structure with separate builds per package
- Includes basic import tests for each package
- This should resolve compatibility issues with older systems like Google Colab
2025-07-25 00:16:08 -07:00
Andy Lee 3603cd5034 fix: downgrade GitHub Actions versions for manylinux2014 compatibility
- Use actions/checkout@v3 instead of v4 (Node.js 16 vs 20)
- Use actions/setup-python@v4 instead of v5
- Use actions/upload-artifact@v3 and download-artifact@v3
- This fixes GLIBC version errors in manylinux2014 containers
- manylinux2014 (CentOS 7) has glibc 2.17 but Node.js 20 needs 2.25+
2025-07-25 00:12:05 -07:00
Andy Lee 6df7893173 feat: use manylinux2014 containers for better Linux compatibility
- Add manylinux2014 Docker containers for Linux builds
- This will generate wheels compatible with older Linux systems (CentOS 7+, Ubuntu 16.04+)
- Separate build logic for container vs regular environments
- Install appropriate system dependencies for yum-based manylinux environment
- Use pip instead of uv in containers for better compatibility
- Fix Python version format for manylinux container paths
2025-07-25 00:08:42 -07:00
Andy Lee 2dd59c4ba1 fix: let auditwheel auto-detect manylinux platform tag
- Remove --plat manylinux2014_x86_64 flag that was causing build failures
- Let auditwheel automatically determine the appropriate manylinux tag
- Add auditwheel show command to display compatibility info
- This fixes the 'too-recent versioned symbols' error
2025-07-24 21:44:15 -07:00
Andy Lee a6aec68f32 fix: use manylinux2014 for better Linux compatibility
- Change auditwheel --plat to manylinux2014_x86_64
- This ensures wheels work on Ubuntu 16.04+ instead of requiring 24.04+
- Fixes compatibility issues for users on Ubuntu 22.04 and similar systems
2025-07-24 21:26:28 -07:00
Andy Lee d8b4ea7564 fix: add write permissions for GitHub Actions to push commits 2025-07-24 20:55:24 -07:00
Andy Lee f0a2ef96b4 fix: restore complete build configuration from working version 2025-07-24 19:49:38 -07:00
Andy Lee 7d73c2c803 fix: remove invalid --extra build flag from build commands 2025-07-24 19:43:23 -07:00
Andy Lee e8d2ecab03 refactor: use reusable workflow to avoid code duplication 2025-07-24 19:35:12 -07:00
Andy Lee 32a374d094 feat: true one-click automated release with multi-platform support 2025-07-24 19:30:44 -07:00
Andy Lee d45c013806 fix: handle workflow trigger permission gracefully 2025-07-24 19:25:29 -07:00
Andy Lee 8307555d54 fix: manually trigger CI after version push in release workflow 2025-07-24 19:21:32 -07:00
Andy Lee 374db0ebb8 fix: release workflow to build new version before publishing 2025-07-24 19:03:09 -07:00
Andy Lee 6c0e39372b fix: download all artifacts in release workflow 2025-07-24 17:45:46 -07:00
Andy Lee 2bec67d2b6 feat: auto-update leann-core dependencies during release
- Enhanced bump_version.sh to automatically update leann-core dependency versions
- Script now updates both package versions and their leann-core dependencies
- This ensures version consistency across all packages during release

No more manual dependency version updates needed!
2025-07-24 17:22:41 -07:00
Andy Lee 133e715832 fix: resolve CI issues and consolidate workflows
- Fix version dependencies: update backend packages to depend on leann-core==0.1.1
- Remove duplicate ci.yml workflow (keeping build-and-publish.yml as main CI)
- Update release-manual.yml to reference correct CI workflow name

This fixes the dependency resolution error and eliminates duplicate builds.
2025-07-24 17:20:58 -07:00
Andy Lee 95cf2f16e2 refactor: consolidate release and publish into single workflow
- Manual Release workflow now directly publishes to PyPI after downloading CI artifacts
- No more duplicate builds - reuses artifacts from CI
- build-and-publish.yml renamed to 'CI - Build Multi-Platform Packages'
- Publishing in CI workflow only for emergency manual triggers
- Updated RELEASE.md to reflect the new streamlined process

This fixes the issue where releases would trigger redundant builds.
2025-07-24 17:04:47 -07:00
Andy Lee 47a4c153eb fix: enable PyPI publish on tag push
- Manual Release workflow creates tags but build-and-publish.yml only published on 'release' events
- Now build-and-publish.yml will also publish when v* tags are pushed
- This fixes the issue where manual releases didn't trigger PyPI uploads
2025-07-24 17:00:21 -07:00
Andy Lee a44dccecac fix: make TestPyPI upload optional and non-blocking
- Add continue-on-error to TestPyPI step
- Check if TEST_PYPI_API_TOKEN exists before attempting upload
- Add graceful failure handling with clear messages
- Update docs to explain TestPyPI token configuration
- Clarify that TestPyPI testing is optional

Now the release won't fail if TestPyPI is not configured or upload fails
2025-07-24 16:02:07 -07:00
Andy Lee 9076bc27b8 fix: resolve CI run detection issues in release workflow
- Add 'actions: read' permission to access workflow runs
- Use workflow name instead of filename for gh run list
- Look for CI run on HEAD~1 (before version bump commit)
- Improve error messages for better debugging

Fixes HTTP 403 error when trying to find successful CI runs
2025-07-24 14:27:26 -07:00
Andy Lee 50686c0819 refactor: use CI artifacts in release workflow instead of rebuilding
- Download pre-built wheels from successful CI runs
- Avoids duplicate builds and ensures consistency
- CI artifacts are already tested across all platforms
- Faster release process (no build time)
- Updates release documentation to reflect new flow

This ensures the released packages are exactly what was tested in CI.
2025-07-24 14:24:03 -07:00
Andy Lee 1614203786 fix: make bump_version.sh work on both macOS and Linux
- macOS uses sed -i '' while Linux uses sed -i
- Add OS detection to use correct syntax
- Ensures script works in CI (Linux) and local dev (macOS)
2025-07-24 14:13:31 -07:00
Andy Lee 3d4c75a56c fix: add missing scripts directory to git
- Remove scripts/ from .gitignore
- Add build_and_test.sh for local testing
- Add bump_version.sh for version updates (used by CI)
- Add release.sh and upload_to_pypi.sh for publishing
- Fixes CI error: ./scripts/bump_version.sh: No such file or directory
2025-07-24 14:13:14 -07:00
Andy Lee 2684ee71dc fix: ensure uv build uses correct Python version in CI
- Add --python python flag to uv build commands
- This ensures wheels are built with the correct Python version (cp313 for Python 3.13, etc)
- Fixes issue where Python 3.13 CI was building cp311 wheels
- Also adds Python version verification before build
2025-07-24 13:44:02 -07:00
Andy Lee 1d321953ba ci: update all GitHub Actions to latest versions
- Update actions/upload-artifact from v3 to v4 (v3 deprecated April 2024)
- Update actions/setup-python from v4 to v5 (latest version)
- Add Python 3.12 and 3.13 to CI test matrix
- Ensure compatibility with latest Python versions and GitHub Actions
2025-07-24 13:36:21 -07:00
Andy Lee b3cb251369 ci: add Python 3.12 and 3.13 to test matrix
- Add Python 3.12 and 3.13 to CI test matrix
- Ensure compatibility with latest Python versions
- Python 3.12 is stable, 3.13 was released in Oct 2024
2025-07-24 13:32:29 -07:00
Andy Lee 0a17d2c9d8 feat: implement comprehensive CI/CD pipeline with two-stage release
- Add ci.yml for continuous integration on every commit
  - Test builds on Ubuntu/macOS with Python 3.9/3.10/3.11
  - Ensure code quality before any release

- Add release-manual.yml for controlled releases
  - Manual trigger prevents accidental releases
  - Version validation and tag creation
  - Optional TestPyPI testing before production
  - Only creates tag after validation passes

- Keep build-and-publish.yml for automated PyPI deployment
  - Triggered by new tags (separation of concerns)
  - Handles multi-platform wheel building
  - Allows retry if PyPI upload fails

- Update RELEASE.md with clear prerequisites and workflow

This setup ensures:
1. Every commit is tested (CI)
2. Releases are deliberate (manual trigger)
3. Failed CI won't create broken tags
4. PyPI publish can be retried independently
2025-07-24 13:29:21 -07:00
Andy Lee e3defbca84 fix: add minimal CI dependencies for HNSW and DiskANN backends
- HNSW (Ubuntu): add libopenblas-dev for BLAS requirements
- DiskANN (Ubuntu): keep MKL, remove redundant pkg-config (HNSW already has it)
- DiskANN (macOS): add protobuf for build requirements
- Both: ensure patchelf for auditwheel on Linux

This avoids OpenBLAS/MKL conflicts by using them in separate jobs
2025-07-24 01:06:57 -07:00
Andy Lee e407f63977 chore: fix uv build 2025-07-24 00:51:57 -07:00
Andy Lee 7add391b2c chore: build and package 2025-07-24 00:47:46 -07:00
Andy Lee e86da38726 fix: ollama hint for similar models 2025-07-23 15:45:10 -07:00
Andy Lee 2420c5fd35 chore: update sentence-transformer to prevent MixIn not found error 2025-07-22 23:27:25 -07:00
Andy Lee e07aaf52a7 docs: align 2025-07-22 22:37:27 -07:00
Andy Lee 30e5f12616 docs: quick start 2025-07-22 22:33:04 -07:00
Andy Lee 594427bf87 docs: demo 2025-07-22 22:32:18 -07:00
Andy Lee 6070160959 chore: remove .vscode 2025-07-22 19:59:35 -07:00
Andy Lee 43155d2811 fix: supress resources leak logs 2025-07-22 19:53:45 -07:00
Andy Lee d3f85678ec perf: much faster loading and embedding serving 2025-07-22 19:38:22 -07:00
Andy Lee 8513471573 feat: make diskann runnable 2025-07-22 14:26:03 -07:00
Andy Lee 71e5f1774c docs: cli 2025-07-21 23:48:40 -07:00
Andy Lee ab72a2ab9d fix: more logs 2025-07-21 23:08:53 -07:00
Andy Lee c2f35c8e73 fix: logs 2025-07-21 23:02:13 -07:00
Andy Lee 573313f0b6 refactor: logs 2025-07-21 22:45:24 -07:00
Andy Lee c112956d2d fix: mlx 2025-07-21 21:29:15 -07:00
Andy Lee b3970793cf fix: cache the loaded model 2025-07-21 21:20:53 -07:00
Andy Lee 2f224f5793 fix: use server to emb query only when recompute 2025-07-21 20:40:21 -07:00
Andy Lee 1b6272ce0e Building, CLI tool & Embedding Server Fixed (#5)
* chore: shorter build time

* chore: update faiss

* fix: no longger do embedding server reuse

* fix: do not reuse emb_server and close it properly

* feat: cli tool

* feat: cli more args

* fix: same embedding logic
2025-07-21 20:17:25 -07:00
Andy Lee 34c71c072d chore: parallel compile fix 2025-07-19 22:51:47 -07:00
Andy Lee 6d2149c503 chore: parallel compile fix 2025-07-19 22:46:24 -07:00
Andy Lee 043b0bf69d chore: parallel compile fix 2025-07-19 22:34:19 -07:00
Andy Lee 9b07e392c6 chore: parallel compile 2025-07-19 22:32:13 -07:00
Andy Lee e60fad8c73 chore: mark diskann as optional 2025-07-19 22:24:44 -07:00
Andy Lee 19c1b182c3 docs: effects figure 2025-07-19 22:07:04 -07:00
Andy Lee 49edea780c docs: figure 2025-07-19 21:59:58 -07:00
Andy Lee 12ef5a1900 docs: effects 2025-07-19 21:57:12 -07:00
Andy Lee d21a134b2a docs: polish 2025-07-19 21:53:41 -07:00
Andy LeeandYichuan Wang 1cd809aa41 [Docs] README polished version (#4)
* docs: polish

* docs: logo

* docs: logo

* docs: logo with text

* docs: readme effects

* docs: polish

* docs: highlight applications

* docs: polish

* docs: how it works earlier

* docs: polish

* docs: polish

* docs: follow yichuan's suggestion

* docs: follow yichuan's suggestion

---------

Co-authored-by: Yichuan Wang <73766326+yichuan-w@users.noreply.github.com>
2025-07-19 21:47:25 -07:00
Andy Lee 85b7ba0168 feat: allow build from existed embeddings 2025-07-19 01:27:37 -07:00
Andy Lee 71c7de9c84 fix: build with direct embedding 2025-07-17 21:49:36 -07:00
Andy Lee 1c5fec5565 perf: make embedder loading faster by 6x, and embed queries through the server 2025-07-17 20:08:06 -07:00
Andy Lee a13c527e39 feat: openai embeddings 2025-07-17 17:02:47 -07:00
Andy Lee f77c4e38cb perf: reuse embedding server for query embed 2025-07-16 16:12:15 -07:00
Andy Lee 2a1a152073 refactor: nits 2025-07-16 15:39:58 -07:00
Andy Lee 7b9406a3ea feat: different search_args and docstrings 2025-07-16 15:25:58 -07:00
Andy Lee c3fb949693 docs: ollama 2025-07-16 15:12:37 -07:00
Andy Lee e595bbb5fb feat: hint for users about wrong model name 2025-07-15 22:40:40 -07:00
Andy Lee 6a1dc895fb feat: disable warmup by default 2025-07-15 22:16:02 -07:00
Andy Lee 125c1f6f25 fix: model name 2025-07-15 21:48:45 -07:00
Andy Lee d94a5176dc docs: storage reduction data 2025-07-15 15:37:17 -07:00
Andy Lee f2feccdbd0 fix: mem compare 2025-07-14 16:35:08 -07:00
Andy Lee b89e56e9c2 fix: file name 2025-07-14 15:34:56 -07:00
Andy Lee baa60b40d1 fix: smaller warmup id 2025-07-14 15:20:45 -07:00
Andy Lee ef01d6997a fix: faiss only 2025-07-14 13:15:55 -07:00