Skip to content

Fix: Correct an issue related to clearing the Faiss index in Flask4ModelCache_demo #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 23, 2024

Conversation

powerli2002
Copy link
Contributor

Fixed an issue where clearing faiss database was invalid when using flask4modelcache_demo.py

When I run flask4modelcache_demo.py, I found that the Cache-Clearing method mentioned in the documentation cannot clear the Faiss index and returns an error message. Upon inspecting the code, I discovered that this logic was not implemented. Therefore, this pull request adds a method to reset the index.

Additionally, I noticed that rebuild_col() only works properly when it has no return value. I'm unsure if this is intended behavior, so I made minimal changes to achieve the desired functionality without altering it.

I'm honored to be involved in your open-source project. Please feel free to contact me if there are any issues with my changes. I'm very eager to join the open-source initiative of CodeFuse AI!

@peng3307165 peng3307165 merged commit e1d4add into codefuse-ai:main May 23, 2024
@peng3307165
Copy link
Collaborator

We've merged your commit that fixes the faiss database clearing issue in flask4modelcache_demo.py.
Thank you for your keen observation and subsequent fix.
Additionally, we find sqlite does not correctly return the number of rows deleted. we have made some adjustments and fixes.
Welcome to join CodeFuse AI open-source initiative.

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.

2 participants