Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions vectordb_bench/backend/clients/api.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from abc import ABC, abstractmethod
from contextlib import contextmanager
from enum import Enum
from enum import StrEnum

from pydantic import BaseModel, SecretStr, validator

from vectordb_bench.backend.filter import Filter, FilterOp


class MetricType(str, Enum):
class MetricType(StrEnum):
L2 = "L2"
COSINE = "COSINE"
IP = "IP"
Expand All @@ -16,7 +16,7 @@ class MetricType(str, Enum):
JACCARD = "JACCARD"


class IndexType(str, Enum):
class IndexType(StrEnum):
HNSW = "HNSW"
HNSW_SQ = "HNSW_SQ"
HNSW_BQ = "HNSW_BQ"
Expand Down Expand Up @@ -47,7 +47,7 @@ class IndexType(str, Enum):
NONE = "NONE"


class SQType(str, Enum):
class SQType(StrEnum):
SQ6 = "SQ6"
SQ8 = "SQ8"
BF16 = "BF16"
Expand Down
4 changes: 2 additions & 2 deletions vectordb_bench/backend/clients/elastic_cloud/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from enum import Enum
from enum import StrEnum

from pydantic import BaseModel, SecretStr

Expand All @@ -16,7 +16,7 @@ def to_dict(self) -> dict:
}


class ESElementType(str, Enum):
class ESElementType(StrEnum):
float = "float" # 4 byte
byte = "byte" # 1 byte, -128 to 127

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from enum import Enum
from enum import StrEnum

from pydantic import BaseModel, SecretStr

Expand All @@ -20,7 +20,7 @@ def to_dict(self) -> dict:
}


class ESElementType(str, Enum):
class ESElementType(StrEnum):
float = "float" # 4 byte
byte = "byte" # 1 byte, -128 to 127

Expand Down