Skip to content

Commit

Permalink
Update ef_search default value to 100
Browse files Browse the repository at this point in the history
  • Loading branch information
itaismith committed Jan 8, 2025
1 parent fe13636 commit eeb86b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions chromadb/api/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ class HNSWConfigurationInternal(ConfigurationInternal):
name="ef_search",
validator=lambda value: isinstance(value, int) and value >= 1,
is_static=False,
default_value=10,
default_value=100,
),
"num_threads": ConfigurationDefinition(
name="num_threads",
Expand Down Expand Up @@ -328,7 +328,7 @@ def __init__(
self,
space: str = "l2",
ef_construction: int = 100,
ef_search: int = 10,
ef_search: int = 100,
num_threads: int = cpu_count(),
M: int = 16,
resize_factor: float = 1.2,
Expand Down
2 changes: 1 addition & 1 deletion chromadb/segment/impl/vector/hnsw_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __init__(self, metadata: Metadata):
metadata = metadata or {}
self.space = str(metadata.get("hnsw:space", "l2"))
self.construction_ef = int(metadata.get("hnsw:construction_ef", 100))
self.search_ef = int(metadata.get("hnsw:search_ef", 10))
self.search_ef = int(metadata.get("hnsw:search_ef", 100))
self.M = int(metadata.get("hnsw:M", 16))
self.num_threads = int(
metadata.get("hnsw:num_threads", multiprocessing.cpu_count())
Expand Down

0 comments on commit eeb86b5

Please sign in to comment.