Skip to content

Conversation

@luis-gasparschroeder
Copy link
Collaborator

@luis-gasparschroeder luis-gasparschroeder commented May 5, 2025

Implemented the core VectorQ policy logic.

@luis-gasparschroeder luis-gasparschroeder self-assigned this May 5, 2025
@luis-gasparschroeder luis-gasparschroeder marked this pull request as ready for review May 5, 2025 22:30
@kyle65463
Copy link
Collaborator

kyle65463 commented May 5, 2025

@luis-gasparschroeder
Do you mind squashing the pr when merging this? It has too many commits, I think it's better to squash them into one to make the commit history prettier.

image

vector_db: VectorDB = HNSWLibVectorDB(),
embedding_metadata_storage: EmbeddingMetadataStorage = InMemoryEmbeddingMetadataStorage(),
eviction_policy: EvictionPolicy = LRUEvictionPolicy(),
eviction_policy: EvictionPolicy = NoEvictionPolicy(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are we going to have a NoEvictionPolicy?
What will happen if the cache is full

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As long as LRU is not implemented, let's have NoEviction. Otherwise, people expect things to be evicted

)

for i, delta in enumerate(vectorq_local_deltas):
for i, _ in enumerate(vectorq_local_latencies):
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you can just use range(len(vectorq_local_latencies)) instead

Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the main purpose of this change? (switching methods order)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Why splitting the original is_global param to two different policies?
Do they have many differences? If >80% are the same, I think it's nicer to keep it with one file like the original one.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We will likely adjust the likelihood computation for the global one. I agree that having both leads to duplicated code, but it's still learn than having if/else statements all over the place in one file.

@luis-gasparschroeder luis-gasparschroeder merged commit f4d2a7b into master May 6, 2025
2 checks passed
@luis-gasparschroeder luis-gasparschroeder deleted the lgs/benchmarking-baselines branch May 9, 2025 05:37
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