Skip to content

make save and load os independent; add uv to pre-commit to .toml#10

Open
marquesafonso wants to merge 1 commit into
mixedbread-ai:mainfrom
marquesafonso:main
Open

make save and load os independent; add uv to pre-commit to .toml#10
marquesafonso wants to merge 1 commit into
mixedbread-ai:mainfrom
marquesafonso:main

Conversation

@marquesafonso

@marquesafonso marquesafonso commented Mar 30, 2025

Copy link
Copy Markdown

Hi there,

Based on this issue I am proposing to you a PR that makes the save and load methods of sparse base index + dense faiss and usearch indices.

The goal is to make baguetter windows compatible.

The problem comes from the fsspec lib and its usage in the LocalFileRepository component.

My approach was to work backwards from there and using the os module to decouple baguetter from fsspec. In the end, the solution practically does away with the LocalFileRepository component, which is rendered useless. But, I kept it as this should be a bigger design decision. Let me know your thoughts.

Right now on a windows machine we get 100% test coverage, whereas before there were 3 errors (on test_base.py, test_faiss.py, and test_usearch.py) which all stemmed from the save and load functions.

test_baguetter

Some changes were done to the tests to align with dropping the LocalFileRepository component after first getting 100% code coverage while keeping the component intact.

Please test it in Linux and/or Mac and let me know if it breaks anything there.

Also added uv to pre-commit and pyproject.toml to enable direct usage with uv (by simply running uv sync on your clone/fork of the repo).

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.

1 participant