Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a24934a
add muvera config
robbespo00 Apr 11, 2025
91d4319
add muvera config in a separate method
robbespo00 Apr 11, 2025
b43b246
minor change
robbespo00 Apr 11, 2025
0b51b5c
update config_methods
robbespo00 Apr 11, 2025
6dcc812
changes to the config methods
robbespo00 Apr 15, 2025
4f87f38
minor changes
robbespo00 Apr 15, 2025
e0b3ea5
reformat files for linting and formatting
robbespo00 Apr 30, 2025
3e0be93
Merge branch 'main' into rob/muvera
robbespo00 Apr 30, 2025
a0ba9c2
run ruff check
robbespo00 Apr 30, 2025
ddcc388
change function calling for muvera creation
robbespo00 Apr 30, 2025
9be797a
minor changes
robbespo00 Apr 30, 2025
b032751
cleaning old code
robbespo00 Apr 30, 2025
16db8c4
run ruff format
robbespo00 Apr 30, 2025
a9b024d
add bc fix
robbespo00 May 2, 2025
0f73881
add get multivector encoding
robbespo00 May 2, 2025
50b47a5
update muvera config
robbespo00 May 2, 2025
eb16969
remove redundant flag options
robbespo00 May 2, 2025
e699498
minor change
robbespo00 May 2, 2025
e4202f3
minor change
robbespo00 May 2, 2025
e2756db
add abstract method
robbespo00 May 2, 2025
372e106
run ruff
robbespo00 May 2, 2025
1366dd4
format config methods
robbespo00 May 2, 2025
056939d
Merge remote-tracking branch 'origin/main' into rob/muvera
robbespo00 May 7, 2025
f96a02f
add test on muvera creation
robbespo00 May 7, 2025
6c56038
run ruff formatter
robbespo00 May 7, 2025
96990f4
add skip muvera test for older version
robbespo00 May 7, 2025
542fd71
minor fix on muvera test
robbespo00 May 7, 2025
9d710df
change minor fix on test
robbespo00 May 8, 2025
176def6
remove explicit enabled flag for muvera
robbespo00 May 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions weaviate/collections/classes/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
)
from weaviate.collections.classes.config_vector_index import (
VectorFilterStrategy,
_MuveraConfigCreate,
_MultiVectorConfigCreate,
_QuantizerConfigCreate,
_VectorIndexConfigCreate,
Expand Down Expand Up @@ -1558,6 +1559,7 @@ class _SQConfig(_ConfigBase):

@dataclass
class _MultiVectorConfig(_ConfigBase):
muvera_config: Optional[_MuveraConfigCreate]
aggregation: str


Expand Down Expand Up @@ -2034,12 +2036,28 @@ def __add_props(
class _VectorIndexMultiVector:
@staticmethod
def multi_vector(
muvera_config: Optional[_MuveraConfigCreate] = None,
aggregation: Optional[MultiVectorAggregation] = None,
) -> _MultiVectorConfigCreate:
return _MultiVectorConfigCreate(
muveraConfig=muvera_config if muvera_config is not None else None,
Comment thread
tsmith023 marked this conversation as resolved.
Outdated
aggregation=aggregation.value if aggregation is not None else None,
)

@staticmethod
def muvera_config(
enabled: Optional[bool] = None,
ksim: Optional[int] = None,
dprojections: Optional[int] = None,
repetitions: Optional[int] = None,
) -> _MuveraConfigCreate:
return _MuveraConfigCreate(
enabled=enabled,
ksim=ksim,
dprojections=dprojections,
repetitions=repetitions,
)


class _VectorIndexQuantizer:
@staticmethod
Expand Down
2 changes: 2 additions & 0 deletions weaviate/collections/classes/config_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ def __get_multivector(config: Dict[str, Any]) -> Optional[_MultiVectorConfig]:
if config.get("multivector") is None
or not config.get("multivector", {"enabled": False}).get("enabled")
else _MultiVectorConfig(
muvera_config=config["multivector"]["muveraConfig"],
aggregation=config["multivector"]["aggregation"],
)
)
Expand Down Expand Up @@ -244,6 +245,7 @@ def __get_vector_config(
),
vector_index_config=vector_index_config,
)

return named_vectors
else:
return None
Expand Down
8 changes: 8 additions & 0 deletions weaviate/collections/classes/config_vector_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,15 @@ class _MultiVectorConfigCreateBase(_ConfigCreateModel):
enabled: bool = Field(default=True)


class _MuveraConfigCreate(_ConfigCreateModel):
enabled: Optional[bool]
ksim: Optional[int]
dprojections: Optional[int]
repetitions: Optional[int]


class _MultiVectorConfigCreate(_MultiVectorConfigCreateBase):
muveraConfig: Optional[_MuveraConfigCreate]
aggregation: Optional[str]


Expand Down
Loading