From e2f4d6a591ef976137b6cd6050e196dd912b3f72 Mon Sep 17 00:00:00 2001 From: Adrian Valente Date: Wed, 10 Apr 2024 19:13:49 +0200 Subject: [PATCH] revert closing --- chromadb/api/client.py | 7 ------- chromadb/test/test_client.py | 1 + 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/chromadb/api/client.py b/chromadb/api/client.py index c1564135de2..ea5adbde7b2 100644 --- a/chromadb/api/client.py +++ b/chromadb/api/client.py @@ -476,13 +476,6 @@ def close(self) -> None: # endregion - @override - def __del__(self) -> None: - # only enforce resource clean-up for ephemeral clients - expand to others? - if self._identifier == "ephemeral": - self.close() - super().__del__() - class AdminClient(SharedSystemClient, AdminAPI): _server: ServerAPI diff --git a/chromadb/test/test_client.py b/chromadb/test/test_client.py index 1456a7b4353..b5f90ccbddf 100644 --- a/chromadb/test/test_client.py +++ b/chromadb/test/test_client.py @@ -321,6 +321,7 @@ def test_delete_ephemeral_client() -> None: client = chromadb.EphemeralClient() coll = client.get_or_create_collection("test") coll.add(ids="1", documents="a", embeddings=[1] * 128) + client.close() del client client = chromadb.EphemeralClient()