Skip to content
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

cache embeddings in vector store #457

Merged
merged 4 commits into from
Jul 18, 2023
Merged

Conversation

Tyrest
Copy link
Contributor

@Tyrest Tyrest commented Jul 13, 2023

Now autolabel caches the embeddings when cache=True in the same database where task runs are cached. This resolves the need to recompute all the embeddings every time.

This directly addresses #396

Returns:
List[List[float]]: List of embeddings.
"""
if self._db_engine:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if db_engine is not set (cache = False), what is the behavior of this function?

texts (Iterable[str]): Iterable of texts.
embeddings (List[List[float]]): List of embeddings.
"""
if self._db_engine:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similar question

@nihit nihit merged commit c852430 into main Jul 18, 2023
2 checks passed
@nihit nihit deleted the cache-embeddings-in-vector-store branch July 18, 2023 04:33
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