Skip to content

Commit 653bd4e

Browse files
authored
Merge pull request #571 from aperture-data/release-0.4.44
Release 0.4.44
2 parents 8d7bfe1 + 36d5b83 commit 653bd4e

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

aperturedb/Utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,8 @@ def count_connections(self, connections_class, constraints=None) -> int:
473473

474474
return total_connections
475475

476-
def add_descriptorset(self, name: str, dim: int, metric="L2", engine="FaissFlat",
476+
def add_descriptorset(self, name: str, dim: int, metric=["CS"],
477+
engine=["HNSW"],
477478
properties: Optional[Dict] = None) -> bool:
478479
"""
479480
Add a descriptor set to the database.

aperturedb/__init__.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,21 @@
88
import platform
99
import faulthandler
1010
import signal
11+
import sys
12+
13+
__version__ = "0.4.44"
14+
15+
logger = logging.getLogger(__name__)
1116

1217
# https://docs.python.org/3/library/faulthandler.html
1318
# Register SIGUSR1 to dump the stack trace
1419
# Good for debugging a running process
15-
faulthandler.register(signal.SIGUSR1.value)
16-
17-
logger = logging.getLogger(__name__)
1820

19-
__version__ = "0.4.43"
21+
if os.getenv("ADB_DEBUGGABLE", None) != None:
22+
if sys.platform == "win32":
23+
logger.warn("Unable to configure debugging support for win32")
24+
else:
25+
faulthandler.register(signal.SIGUSR1.value)
2026

2127
# set log level
2228
formatter = logging.Formatter(

aperturedb/transformers/clip_pytorch_embeddings.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ def __init__(self, data: Subscriptable, **kwargs) -> None:
2424
if len(self._add_image_index) > 0:
2525
sample = generate_embedding(self.data[0][1][0])
2626
utils = self.get_utils()
27-
utils.add_descriptorset(self.search_set_name, dim=len(sample) // 4)
27+
utils.add_descriptorset(
28+
self.search_set_name, dim=len(sample) // 4, metric=["CS"])
2829

2930
def getitem(self, subscript):
3031
x = self.data[subscript]

0 commit comments

Comments
 (0)