From 060cd228870556347fbd8549964d540d43d62a48 Mon Sep 17 00:00:00 2001 From: Jesse Schumacher Date: Fri, 19 Jul 2024 13:39:50 -0700 Subject: [PATCH 01/23] feat: Update aerospike-vector-search client to 1.0.0 --- .../integrations/vectorstores/aerospike.ipynb | 2 +- .../docker-compose/aerospike/.gitignore | 1 + ...-proximus.yml => aerospike-vector-search.yml} | 16 ++++++++-------- .../docker-compose/aerospike/aerospike.conf | 2 +- .../docker-compose/aerospike/docker-compose.yml | 6 +++--- 5 files changed, 14 insertions(+), 13 deletions(-) create mode 100644 libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/.gitignore rename libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/{aerospike-proximus.yml => aerospike-vector-search.yml} (73%) diff --git a/docs/docs/integrations/vectorstores/aerospike.ipynb b/docs/docs/integrations/vectorstores/aerospike.ipynb index b2ad324b0554f..14e32883e928e 100644 --- a/docs/docs/integrations/vectorstores/aerospike.ipynb +++ b/docs/docs/integrations/vectorstores/aerospike.ipynb @@ -51,7 +51,7 @@ }, "outputs": [], "source": [ - "!pip install --upgrade --quiet aerospike-vector-search==0.6.1 langchain-community sentence-transformers langchain" + "!pip install --upgrade --quiet aerospike-vector-search==1.0.0 langchain-community sentence-transformers langchain" ] }, { diff --git a/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/.gitignore b/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/.gitignore new file mode 100644 index 0000000000000..b884250a88c58 --- /dev/null +++ b/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/.gitignore @@ -0,0 +1 @@ +features.conf \ No newline at end of file diff --git a/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike-proximus.yml b/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike-vector-search.yml similarity index 73% rename from libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike-proximus.yml rename to libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike-vector-search.yml index 248706780657a..834c9afb69dfb 100644 --- a/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike-proximus.yml +++ b/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike-vector-search.yml @@ -6,12 +6,11 @@ cluster: # The Proximus service listening ports, TLS and network interface. service: ports: - 5002: {} - # Uncomment for local debugging - advertised-listeners: - default: - address: 127.0.0.1 - port: 5002 + 5002: + advertised-listeners: + default: + address: 127.0.0.1 + port: 5002 # Management API listening ports, TLS and network interface. manage: @@ -24,7 +23,7 @@ interconnect: 5001: {} # Target Aerospike cluster -aerospike: +storage: seeds: - aerospike: port: 3000 @@ -32,5 +31,6 @@ aerospike: # The logging properties. logging: enable-console-logging: true + file: "/etc/aerospike-vector-search/avs.log" levels: - metrics-ticker: off + metrics-ticker: info diff --git a/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike.conf b/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike.conf index fba3a7a33e961..391986e115a8a 100644 --- a/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike.conf +++ b/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike.conf @@ -51,7 +51,7 @@ namespace test { } } -namespace proximus-meta { +namespace avs-meta { replication-factor 1 nsup-period 100 diff --git a/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/docker-compose.yml b/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/docker-compose.yml index ea6642dfc971f..3bcfbf12ce5a2 100644 --- a/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/docker-compose.yml +++ b/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/docker-compose.yml @@ -10,14 +10,14 @@ services: command: - "--config-file" - "/opt/aerospike/etc/aerospike/aerospike.conf" - proximus: - image: aerospike/aerospike-proximus:0.4.0 + avs: + image: aerospike/aerospike-vector-search:0.9.0 ports: - "5002:5002" networks: - aerospike-test volumes: - - .:/etc/aerospike-proximus + - .:/etc/aerospike-vector-search networks: aerospike-test: {} From e28361d18e4052fc8a510ab88d932182e9a5e3e9 Mon Sep 17 00:00:00 2001 From: Jesse Schumacher Date: Fri, 19 Jul 2024 13:40:25 -0700 Subject: [PATCH 02/23] fix: Remove unsupported options from ini_options --- libs/community/pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libs/community/pyproject.toml b/libs/community/pyproject.toml index 49dac5f63aa94..5634e7c56927e 100644 --- a/libs/community/pyproject.toml +++ b/libs/community/pyproject.toml @@ -50,9 +50,8 @@ select = [ "E", "F", "I", "T201",] omit = [ "tests/*",] [tool.pytest.ini_options] -addopts = "--strict-markers --strict-config --durations=5 --snapshot-warn-unused -vv" +addopts = "--strict-markers --strict-config --durations=5 -vv" markers = [ "requires: mark tests as requiring a specific library", "scheduled: mark tests to run in scheduled testing", "compile: mark placeholder test used to compile integration tests without running them",] -asyncio_mode = "auto" [tool.poetry.group.test] optional = true From 02b3db209597e1f6bed655955d0f844d8eabd7c6 Mon Sep 17 00:00:00 2001 From: Jesse Schumacher Date: Wed, 24 Jul 2024 10:54:24 -0700 Subject: [PATCH 03/23] rename metadatas to labels --- .../integrations/vectorstores/aerospike.ipynb | 2 +- .../vectorstores/aerospike.py | 20 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/docs/integrations/vectorstores/aerospike.ipynb b/docs/docs/integrations/vectorstores/aerospike.ipynb index 14e32883e928e..24543aacc2f7f 100644 --- a/docs/docs/integrations/vectorstores/aerospike.ipynb +++ b/docs/docs/integrations/vectorstores/aerospike.ipynb @@ -401,7 +401,7 @@ " vector_field=VECTOR_KEY,\n", " vector_distance_metric=MODEL_DISTANCE_CALC,\n", " dimensions=MODEL_DIM,\n", - " index_meta_data={\n", + " index_labels={\n", " \"model\": \"miniLM-L6-v2\",\n", " \"date\": \"05/04/2024\",\n", " \"dim\": str(MODEL_DIM),\n", diff --git a/libs/community/langchain_community/vectorstores/aerospike.py b/libs/community/langchain_community/vectorstores/aerospike.py index e7759923b6126..e300d3c784573 100644 --- a/libs/community/langchain_community/vectorstores/aerospike.py +++ b/libs/community/langchain_community/vectorstores/aerospike.py @@ -155,7 +155,7 @@ def convert_distance_strategy( def add_texts( self, texts: Iterable[str], - metadatas: Optional[List[dict]] = None, + labels: Optional[List[dict[str, str]]] = None, ids: Optional[List[str]] = None, set_name: Optional[str] = None, embedding_chunk_size: int = 1000, @@ -168,7 +168,7 @@ def add_texts( Args: texts: Iterable of strings to add to the vectorstore. - metadatas: Optional list of metadatas associated with the texts. + labels: Optional list of labels associated with the texts. ids: Optional list of ids to associate with the texts. set_name: Optional aerospike set name to add the texts to. batch_size: Batch size to use when adding the texts to the vectorstore. @@ -197,24 +197,24 @@ def add_texts( ids = ids or [str(uuid.uuid4()) for _ in texts] # We need to shallow copy so that we can add the vector and text keys - if metadatas: - metadatas = [m.copy() for m in metadatas] + if labels: + labels = [m.copy() for m in labels] else: - metadatas = metadatas or [{} for _ in texts] + labels = labels or [{} for _ in texts] for i in range(0, len(texts), embedding_chunk_size): chunk_texts = texts[i : i + embedding_chunk_size] chunk_ids = ids[i : i + embedding_chunk_size] - chunk_metadatas = metadatas[i : i + embedding_chunk_size] + chunk_labels = labels[i : i + embedding_chunk_size] embeddings = self._embed_documents(chunk_texts) for metadata, embedding, text in zip( - chunk_metadatas, embeddings, chunk_texts + chunk_labels, embeddings, chunk_texts ): metadata[self._vector_key] = embedding metadata[self._text_key] = text - for id, metadata in zip(chunk_ids, chunk_metadatas): + for id, metadata in zip(chunk_ids, chunk_labels): metadata[self._id_key] = id self._client.upsert( namespace=self._namespace, @@ -545,7 +545,7 @@ def from_texts( cls, texts: List[str], embedding: Embeddings, - metadatas: Optional[List[dict]] = None, + labels: Optional[List[dict]] = None, client: Client = None, namespace: str = "test", index_name: Optional[str] = None, @@ -589,7 +589,7 @@ def from_texts( aerospike.add_texts( texts, - metadatas=metadatas, + labels=labels, ids=ids, index_name=index_name, embedding_chunk_size=embeddings_chunk_size, From bfc679e3d25115b8c127ced05f9dae6344a84d26 Mon Sep 17 00:00:00 2001 From: Jesse S Date: Mon, 29 Jul 2024 10:20:11 -0700 Subject: [PATCH 04/23] Vec 229 aerospike 1.0 (#2) * feat: Update aerospike-vector-search client to 1.0.0 * fix: Remove unsupported options from ini_options * rename metadatas to labels --------- Co-authored-by: Jesse Schumacher --- .../integrations/vectorstores/aerospike.ipynb | 4 ++-- .../vectorstores/aerospike.py | 20 +++++++++---------- libs/community/pyproject.toml | 3 +-- .../docker-compose/aerospike/.gitignore | 1 + ...oximus.yml => aerospike-vector-search.yml} | 16 +++++++-------- .../docker-compose/aerospike/aerospike.conf | 2 +- .../aerospike/docker-compose.yml | 6 +++--- 7 files changed, 26 insertions(+), 26 deletions(-) create mode 100644 libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/.gitignore rename libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/{aerospike-proximus.yml => aerospike-vector-search.yml} (73%) diff --git a/docs/docs/integrations/vectorstores/aerospike.ipynb b/docs/docs/integrations/vectorstores/aerospike.ipynb index b2ad324b0554f..24543aacc2f7f 100644 --- a/docs/docs/integrations/vectorstores/aerospike.ipynb +++ b/docs/docs/integrations/vectorstores/aerospike.ipynb @@ -51,7 +51,7 @@ }, "outputs": [], "source": [ - "!pip install --upgrade --quiet aerospike-vector-search==0.6.1 langchain-community sentence-transformers langchain" + "!pip install --upgrade --quiet aerospike-vector-search==1.0.0 langchain-community sentence-transformers langchain" ] }, { @@ -401,7 +401,7 @@ " vector_field=VECTOR_KEY,\n", " vector_distance_metric=MODEL_DISTANCE_CALC,\n", " dimensions=MODEL_DIM,\n", - " index_meta_data={\n", + " index_labels={\n", " \"model\": \"miniLM-L6-v2\",\n", " \"date\": \"05/04/2024\",\n", " \"dim\": str(MODEL_DIM),\n", diff --git a/libs/community/langchain_community/vectorstores/aerospike.py b/libs/community/langchain_community/vectorstores/aerospike.py index e7759923b6126..e300d3c784573 100644 --- a/libs/community/langchain_community/vectorstores/aerospike.py +++ b/libs/community/langchain_community/vectorstores/aerospike.py @@ -155,7 +155,7 @@ def convert_distance_strategy( def add_texts( self, texts: Iterable[str], - metadatas: Optional[List[dict]] = None, + labels: Optional[List[dict[str, str]]] = None, ids: Optional[List[str]] = None, set_name: Optional[str] = None, embedding_chunk_size: int = 1000, @@ -168,7 +168,7 @@ def add_texts( Args: texts: Iterable of strings to add to the vectorstore. - metadatas: Optional list of metadatas associated with the texts. + labels: Optional list of labels associated with the texts. ids: Optional list of ids to associate with the texts. set_name: Optional aerospike set name to add the texts to. batch_size: Batch size to use when adding the texts to the vectorstore. @@ -197,24 +197,24 @@ def add_texts( ids = ids or [str(uuid.uuid4()) for _ in texts] # We need to shallow copy so that we can add the vector and text keys - if metadatas: - metadatas = [m.copy() for m in metadatas] + if labels: + labels = [m.copy() for m in labels] else: - metadatas = metadatas or [{} for _ in texts] + labels = labels or [{} for _ in texts] for i in range(0, len(texts), embedding_chunk_size): chunk_texts = texts[i : i + embedding_chunk_size] chunk_ids = ids[i : i + embedding_chunk_size] - chunk_metadatas = metadatas[i : i + embedding_chunk_size] + chunk_labels = labels[i : i + embedding_chunk_size] embeddings = self._embed_documents(chunk_texts) for metadata, embedding, text in zip( - chunk_metadatas, embeddings, chunk_texts + chunk_labels, embeddings, chunk_texts ): metadata[self._vector_key] = embedding metadata[self._text_key] = text - for id, metadata in zip(chunk_ids, chunk_metadatas): + for id, metadata in zip(chunk_ids, chunk_labels): metadata[self._id_key] = id self._client.upsert( namespace=self._namespace, @@ -545,7 +545,7 @@ def from_texts( cls, texts: List[str], embedding: Embeddings, - metadatas: Optional[List[dict]] = None, + labels: Optional[List[dict]] = None, client: Client = None, namespace: str = "test", index_name: Optional[str] = None, @@ -589,7 +589,7 @@ def from_texts( aerospike.add_texts( texts, - metadatas=metadatas, + labels=labels, ids=ids, index_name=index_name, embedding_chunk_size=embeddings_chunk_size, diff --git a/libs/community/pyproject.toml b/libs/community/pyproject.toml index b468b9192cb04..27085fa379d21 100644 --- a/libs/community/pyproject.toml +++ b/libs/community/pyproject.toml @@ -54,9 +54,8 @@ select = [ "E", "F", "I", "T201",] omit = [ "tests/*",] [tool.pytest.ini_options] -addopts = "--strict-markers --strict-config --durations=5 --snapshot-warn-unused -vv" +addopts = "--strict-markers --strict-config --durations=5 -vv" markers = [ "requires: mark tests as requiring a specific library", "scheduled: mark tests to run in scheduled testing", "compile: mark placeholder test used to compile integration tests without running them",] -asyncio_mode = "auto" [tool.poetry.group.test] optional = true diff --git a/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/.gitignore b/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/.gitignore new file mode 100644 index 0000000000000..b884250a88c58 --- /dev/null +++ b/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/.gitignore @@ -0,0 +1 @@ +features.conf \ No newline at end of file diff --git a/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike-proximus.yml b/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike-vector-search.yml similarity index 73% rename from libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike-proximus.yml rename to libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike-vector-search.yml index 248706780657a..834c9afb69dfb 100644 --- a/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike-proximus.yml +++ b/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike-vector-search.yml @@ -6,12 +6,11 @@ cluster: # The Proximus service listening ports, TLS and network interface. service: ports: - 5002: {} - # Uncomment for local debugging - advertised-listeners: - default: - address: 127.0.0.1 - port: 5002 + 5002: + advertised-listeners: + default: + address: 127.0.0.1 + port: 5002 # Management API listening ports, TLS and network interface. manage: @@ -24,7 +23,7 @@ interconnect: 5001: {} # Target Aerospike cluster -aerospike: +storage: seeds: - aerospike: port: 3000 @@ -32,5 +31,6 @@ aerospike: # The logging properties. logging: enable-console-logging: true + file: "/etc/aerospike-vector-search/avs.log" levels: - metrics-ticker: off + metrics-ticker: info diff --git a/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike.conf b/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike.conf index fba3a7a33e961..391986e115a8a 100644 --- a/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike.conf +++ b/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike.conf @@ -51,7 +51,7 @@ namespace test { } } -namespace proximus-meta { +namespace avs-meta { replication-factor 1 nsup-period 100 diff --git a/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/docker-compose.yml b/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/docker-compose.yml index ea6642dfc971f..3bcfbf12ce5a2 100644 --- a/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/docker-compose.yml +++ b/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/docker-compose.yml @@ -10,14 +10,14 @@ services: command: - "--config-file" - "/opt/aerospike/etc/aerospike/aerospike.conf" - proximus: - image: aerospike/aerospike-proximus:0.4.0 + avs: + image: aerospike/aerospike-vector-search:0.9.0 ports: - "5002:5002" networks: - aerospike-test volumes: - - .:/etc/aerospike-proximus + - .:/etc/aerospike-vector-search networks: aerospike-test: {} From 7c6d8bba35fbcddbf8a81cd8018a764b4d7a532f Mon Sep 17 00:00:00 2001 From: Jesse Schumacher Date: Fri, 9 Aug 2024 11:24:53 -0700 Subject: [PATCH 05/23] remove reference to proximus --- docs/docs/integrations/vectorstores/aerospike.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs/integrations/vectorstores/aerospike.ipynb b/docs/docs/integrations/vectorstores/aerospike.ipynb index 24543aacc2f7f..f6c7d9a772ed0 100644 --- a/docs/docs/integrations/vectorstores/aerospike.ipynb +++ b/docs/docs/integrations/vectorstores/aerospike.ipynb @@ -29,8 +29,8 @@ "metadata": {}, "outputs": [], "source": [ - "PROXIMUS_HOST = \"\"\n", - "PROXIMUS_PORT = 5000" + "AVS_HOST = \"\"\n", + "AVS_PORT = 5000" ] }, { @@ -369,7 +369,7 @@ "from langchain_community.vectorstores import Aerospike\n", "\n", "# Here we are using the AVS host and port you configured earlier\n", - "seed = HostPort(host=PROXIMUS_HOST, port=PROXIMUS_PORT)\n", + "seed = HostPort(host=AVS_HOST, port=AVS_PORT)\n", "\n", "# The namespace of where to place our vectors. This should match the vector configured in your docstore.conf file.\n", "NAMESPACE = \"test\"\n", From 84c5bae28e06b8c4a0743ab0f805bd8dcdcae72e Mon Sep 17 00:00:00 2001 From: Jesse S Date: Fri, 9 Aug 2024 11:27:01 -0700 Subject: [PATCH 06/23] Vec 229 aerospike 1.0 (#3) * remove reference to proximus --- docs/docs/integrations/vectorstores/aerospike.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs/integrations/vectorstores/aerospike.ipynb b/docs/docs/integrations/vectorstores/aerospike.ipynb index 24543aacc2f7f..f6c7d9a772ed0 100644 --- a/docs/docs/integrations/vectorstores/aerospike.ipynb +++ b/docs/docs/integrations/vectorstores/aerospike.ipynb @@ -29,8 +29,8 @@ "metadata": {}, "outputs": [], "source": [ - "PROXIMUS_HOST = \"\"\n", - "PROXIMUS_PORT = 5000" + "AVS_HOST = \"\"\n", + "AVS_PORT = 5000" ] }, { @@ -369,7 +369,7 @@ "from langchain_community.vectorstores import Aerospike\n", "\n", "# Here we are using the AVS host and port you configured earlier\n", - "seed = HostPort(host=PROXIMUS_HOST, port=PROXIMUS_PORT)\n", + "seed = HostPort(host=AVS_HOST, port=AVS_PORT)\n", "\n", "# The namespace of where to place our vectors. This should match the vector configured in your docstore.conf file.\n", "NAMESPACE = \"test\"\n", From 773659021de2624d2d6176707aa0332266165a94 Mon Sep 17 00:00:00 2001 From: Jesse Schumacher Date: Wed, 14 Aug 2024 17:57:53 -0700 Subject: [PATCH 07/23] update python client --- docs/docs/integrations/vectorstores/aerospike.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/integrations/vectorstores/aerospike.ipynb b/docs/docs/integrations/vectorstores/aerospike.ipynb index f6c7d9a772ed0..d477cc03771fa 100644 --- a/docs/docs/integrations/vectorstores/aerospike.ipynb +++ b/docs/docs/integrations/vectorstores/aerospike.ipynb @@ -51,7 +51,7 @@ }, "outputs": [], "source": [ - "!pip install --upgrade --quiet aerospike-vector-search==1.0.0 langchain-community sentence-transformers langchain" + "!pip install --upgrade --quiet aerospike-vector-search==1.0.2 langchain-community sentence-transformers langchain" ] }, { From 61bfbfec562d1743c8ae4ec5ddd461c7af70ce95 Mon Sep 17 00:00:00 2001 From: Jesse Schumacher Date: Fri, 23 Aug 2024 16:00:32 -0700 Subject: [PATCH 08/23] revert --- libs/community/pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/community/pyproject.toml b/libs/community/pyproject.toml index 522e02a7e7e98..1633f5ab29462 100644 --- a/libs/community/pyproject.toml +++ b/libs/community/pyproject.toml @@ -54,8 +54,9 @@ select = [ "E", "F", "I", "T201",] omit = [ "tests/*",] [tool.pytest.ini_options] -addopts = "--strict-markers --strict-config --durations=5 -vv" +addopts = "--strict-markers --strict-config --durations=5 --snapshot-warn-unused -vv" markers = [ "requires: mark tests as requiring a specific library", "scheduled: mark tests to run in scheduled testing", "compile: mark placeholder test used to compile integration tests without running them",] +asyncio_mode = "auto" [tool.poetry.group.test] optional = true From deb36b19eed6c788cd9403e032d4af2a98108aa9 Mon Sep 17 00:00:00 2001 From: Jesse Schumacher Date: Tue, 10 Sep 2024 15:37:09 -0700 Subject: [PATCH 09/23] VEC-308 upgrade to 2.0.0 python client in notebook also upgrade tests to use avs 0.10.0 --- .../integrations/vectorstores/aerospike.ipynb | 2 +- .../vectorstores/aerospike.py | 20 +++++++++---------- .../aerospike/docker-compose.yml | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/docs/integrations/vectorstores/aerospike.ipynb b/docs/docs/integrations/vectorstores/aerospike.ipynb index d477cc03771fa..88b8a2a85dba4 100644 --- a/docs/docs/integrations/vectorstores/aerospike.ipynb +++ b/docs/docs/integrations/vectorstores/aerospike.ipynb @@ -51,7 +51,7 @@ }, "outputs": [], "source": [ - "!pip install --upgrade --quiet aerospike-vector-search==1.0.2 langchain-community sentence-transformers langchain" + "!pip install --upgrade --quiet aerospike-vector-search==2.0.0 langchain-community sentence-transformers langchain" ] }, { diff --git a/libs/community/langchain_community/vectorstores/aerospike.py b/libs/community/langchain_community/vectorstores/aerospike.py index f0b123df28b12..df661fff702ae 100644 --- a/libs/community/langchain_community/vectorstores/aerospike.py +++ b/libs/community/langchain_community/vectorstores/aerospike.py @@ -155,7 +155,7 @@ def convert_distance_strategy( def add_texts( self, texts: Iterable[str], - labels: Optional[List[dict[str, str]]] = None, + metadata: Optional[List[dict]] = None, ids: Optional[List[str]] = None, set_name: Optional[str] = None, embedding_chunk_size: int = 1000, @@ -168,7 +168,7 @@ def add_texts( Args: texts: Iterable of strings to add to the vectorstore. - labels: Optional list of labels associated with the texts. + metadata: Optional list of metadata associated with the texts. ids: Optional list of ids to associate with the texts. set_name: Optional aerospike set name to add the texts to. batch_size: Batch size to use when adding the texts to the vectorstore. @@ -197,24 +197,24 @@ def add_texts( ids = ids or [str(uuid.uuid4()) for _ in texts] # We need to shallow copy so that we can add the vector and text keys - if labels: - labels = [m.copy() for m in labels] + if metadata: + metadata = [m.copy() for m in metadata] else: - labels = labels or [{} for _ in texts] + metadata = metadata or [{} for _ in texts] for i in range(0, len(texts), embedding_chunk_size): chunk_texts = texts[i : i + embedding_chunk_size] chunk_ids = ids[i : i + embedding_chunk_size] - chunk_labels = labels[i : i + embedding_chunk_size] + chunk_metadata = metadata[i : i + embedding_chunk_size] embeddings = self._embed_documents(chunk_texts) for metadata, embedding, text in zip( - chunk_labels, embeddings, chunk_texts + chunk_metadata, embeddings, chunk_texts ): metadata[self._vector_key] = embedding metadata[self._text_key] = text - for id, metadata in zip(chunk_ids, chunk_labels): + for id, metadata in zip(chunk_ids, chunk_metadata): metadata[self._id_key] = id self._client.upsert( namespace=self._namespace, @@ -545,7 +545,7 @@ def from_texts( cls, texts: List[str], embedding: Embeddings, - labels: Optional[List[dict]] = None, + metadata: Optional[List[dict]] = None, client: Client = None, namespace: str = "test", index_name: Optional[str] = None, @@ -589,7 +589,7 @@ def from_texts( aerospike.add_texts( texts, - labels=labels, + metadata=metadata, ids=ids, index_name=index_name, embedding_chunk_size=embeddings_chunk_size, diff --git a/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/docker-compose.yml b/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/docker-compose.yml index 3bcfbf12ce5a2..40254fd58b23a 100644 --- a/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/docker-compose.yml +++ b/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/docker-compose.yml @@ -11,7 +11,7 @@ services: - "--config-file" - "/opt/aerospike/etc/aerospike/aerospike.conf" avs: - image: aerospike/aerospike-vector-search:0.9.0 + image: aerospike/aerospike-vector-search:0.10.0 ports: - "5002:5002" networks: From abb2e88a76ba770c903aef3636305469b4622944 Mon Sep 17 00:00:00 2001 From: Jesse Schumacher Date: Tue, 10 Sep 2024 15:39:15 -0700 Subject: [PATCH 10/23] fix --- .../vectorstores/aerospike.py | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/libs/community/langchain_community/vectorstores/aerospike.py b/libs/community/langchain_community/vectorstores/aerospike.py index df661fff702ae..a4dc81a12d0e5 100644 --- a/libs/community/langchain_community/vectorstores/aerospike.py +++ b/libs/community/langchain_community/vectorstores/aerospike.py @@ -155,7 +155,7 @@ def convert_distance_strategy( def add_texts( self, texts: Iterable[str], - metadata: Optional[List[dict]] = None, + metadatas: Optional[List[dict]] = None, ids: Optional[List[str]] = None, set_name: Optional[str] = None, embedding_chunk_size: int = 1000, @@ -168,7 +168,7 @@ def add_texts( Args: texts: Iterable of strings to add to the vectorstore. - metadata: Optional list of metadata associated with the texts. + metadatas: Optional list of metadata associated with the texts. ids: Optional list of ids to associate with the texts. set_name: Optional aerospike set name to add the texts to. batch_size: Batch size to use when adding the texts to the vectorstore. @@ -197,30 +197,30 @@ def add_texts( ids = ids or [str(uuid.uuid4()) for _ in texts] # We need to shallow copy so that we can add the vector and text keys - if metadata: - metadata = [m.copy() for m in metadata] + if metadatas: + metadatas = [m.copy() for m in metadatas] else: - metadata = metadata or [{} for _ in texts] + metadatas = metadatas or [{} for _ in texts] for i in range(0, len(texts), embedding_chunk_size): chunk_texts = texts[i : i + embedding_chunk_size] chunk_ids = ids[i : i + embedding_chunk_size] - chunk_metadata = metadata[i : i + embedding_chunk_size] + chunk_metadata = metadatas[i : i + embedding_chunk_size] embeddings = self._embed_documents(chunk_texts) - for metadata, embedding, text in zip( + for metadatas, embedding, text in zip( chunk_metadata, embeddings, chunk_texts ): - metadata[self._vector_key] = embedding - metadata[self._text_key] = text + metadatas[self._vector_key] = embedding + metadatas[self._text_key] = text - for id, metadata in zip(chunk_ids, chunk_metadata): - metadata[self._id_key] = id + for id, metadatas in zip(chunk_ids, chunk_metadata): + metadatas[self._id_key] = id self._client.upsert( namespace=self._namespace, key=id, set_name=set_name, - record_data=metadata, + record_data=metadatas, **kwargs, ) @@ -545,7 +545,7 @@ def from_texts( cls, texts: List[str], embedding: Embeddings, - metadata: Optional[List[dict]] = None, + metadatas: Optional[List[dict]] = None, client: Client = None, namespace: str = "test", index_name: Optional[str] = None, @@ -589,7 +589,7 @@ def from_texts( aerospike.add_texts( texts, - metadata=metadata, + metadatas=metadatas, ids=ids, index_name=index_name, embedding_chunk_size=embeddings_chunk_size, From 697a1256ec820cfc13545d1f6a9475687c0f3f52 Mon Sep 17 00:00:00 2001 From: Jesse Schumacher Date: Tue, 10 Sep 2024 15:40:03 -0700 Subject: [PATCH 11/23] revert --- .../community/langchain_community/vectorstores/aerospike.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/community/langchain_community/vectorstores/aerospike.py b/libs/community/langchain_community/vectorstores/aerospike.py index a4dc81a12d0e5..e3b89cfaad5a8 100644 --- a/libs/community/langchain_community/vectorstores/aerospike.py +++ b/libs/community/langchain_community/vectorstores/aerospike.py @@ -205,16 +205,16 @@ def add_texts( for i in range(0, len(texts), embedding_chunk_size): chunk_texts = texts[i : i + embedding_chunk_size] chunk_ids = ids[i : i + embedding_chunk_size] - chunk_metadata = metadatas[i : i + embedding_chunk_size] + chunk_metadatas = metadatas[i : i + embedding_chunk_size] embeddings = self._embed_documents(chunk_texts) for metadatas, embedding, text in zip( - chunk_metadata, embeddings, chunk_texts + chunk_metadatas, embeddings, chunk_texts ): metadatas[self._vector_key] = embedding metadatas[self._text_key] = text - for id, metadatas in zip(chunk_ids, chunk_metadata): + for id, metadatas in zip(chunk_ids, chunk_metadatas): metadatas[self._id_key] = id self._client.upsert( namespace=self._namespace, From 323a0ffd0dc8dab672c431c320b56504c8f4ec29 Mon Sep 17 00:00:00 2001 From: Jesse Schumacher Date: Tue, 10 Sep 2024 15:40:44 -0700 Subject: [PATCH 12/23] revert --- libs/community/langchain_community/vectorstores/aerospike.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/community/langchain_community/vectorstores/aerospike.py b/libs/community/langchain_community/vectorstores/aerospike.py index e3b89cfaad5a8..b3c54a269d302 100644 --- a/libs/community/langchain_community/vectorstores/aerospike.py +++ b/libs/community/langchain_community/vectorstores/aerospike.py @@ -168,7 +168,7 @@ def add_texts( Args: texts: Iterable of strings to add to the vectorstore. - metadatas: Optional list of metadata associated with the texts. + metadatas: Optional list of metadatas associated with the texts. ids: Optional list of ids to associate with the texts. set_name: Optional aerospike set name to add the texts to. batch_size: Batch size to use when adding the texts to the vectorstore. From 8e0b732ac7c10c676731879b8485d10fa0fa2e70 Mon Sep 17 00:00:00 2001 From: Jesse Schumacher Date: Tue, 10 Sep 2024 15:43:59 -0700 Subject: [PATCH 13/23] minimize diff --- .../vectorstores/aerospike.py | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/libs/community/langchain_community/vectorstores/aerospike.py b/libs/community/langchain_community/vectorstores/aerospike.py index b3c54a269d302..694a5a91d4ce9 100644 --- a/libs/community/langchain_community/vectorstores/aerospike.py +++ b/libs/community/langchain_community/vectorstores/aerospike.py @@ -155,7 +155,7 @@ def convert_distance_strategy( def add_texts( self, texts: Iterable[str], - metadatas: Optional[List[dict]] = None, + metadata: Optional[List[dict]] = None, ids: Optional[List[str]] = None, set_name: Optional[str] = None, embedding_chunk_size: int = 1000, @@ -197,30 +197,30 @@ def add_texts( ids = ids or [str(uuid.uuid4()) for _ in texts] # We need to shallow copy so that we can add the vector and text keys - if metadatas: - metadatas = [m.copy() for m in metadatas] + if metadata: + metadata = [m.copy() for m in metadata] else: - metadatas = metadatas or [{} for _ in texts] + metadata = metadata or [{} for _ in texts] for i in range(0, len(texts), embedding_chunk_size): chunk_texts = texts[i : i + embedding_chunk_size] chunk_ids = ids[i : i + embedding_chunk_size] - chunk_metadatas = metadatas[i : i + embedding_chunk_size] + chunk_metadatas = metadata[i : i + embedding_chunk_size] embeddings = self._embed_documents(chunk_texts) - for metadatas, embedding, text in zip( + for metadata, embedding, text in zip( chunk_metadatas, embeddings, chunk_texts ): - metadatas[self._vector_key] = embedding - metadatas[self._text_key] = text + metadata[self._vector_key] = embedding + metadata[self._text_key] = text - for id, metadatas in zip(chunk_ids, chunk_metadatas): - metadatas[self._id_key] = id + for id, metadata in zip(chunk_ids, chunk_metadatas): + metadata[self._id_key] = id self._client.upsert( namespace=self._namespace, key=id, set_name=set_name, - record_data=metadatas, + record_data=metadata, **kwargs, ) @@ -589,7 +589,7 @@ def from_texts( aerospike.add_texts( texts, - metadatas=metadatas, + metadata=metadatas, ids=ids, index_name=index_name, embedding_chunk_size=embeddings_chunk_size, From caf071bc8fcaade8a6c4b7851ea39de968d27db9 Mon Sep 17 00:00:00 2001 From: Jesse Schumacher Date: Tue, 10 Sep 2024 15:44:42 -0700 Subject: [PATCH 14/23] minimize diff --- .../langchain_community/vectorstores/aerospike.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/community/langchain_community/vectorstores/aerospike.py b/libs/community/langchain_community/vectorstores/aerospike.py index 694a5a91d4ce9..10265cb5e9846 100644 --- a/libs/community/langchain_community/vectorstores/aerospike.py +++ b/libs/community/langchain_community/vectorstores/aerospike.py @@ -155,7 +155,7 @@ def convert_distance_strategy( def add_texts( self, texts: Iterable[str], - metadata: Optional[List[dict]] = None, + metadatas: Optional[List[dict]] = None, ids: Optional[List[str]] = None, set_name: Optional[str] = None, embedding_chunk_size: int = 1000, @@ -197,15 +197,15 @@ def add_texts( ids = ids or [str(uuid.uuid4()) for _ in texts] # We need to shallow copy so that we can add the vector and text keys - if metadata: - metadata = [m.copy() for m in metadata] + if metadatas: + metadatas = [m.copy() for m in metadatas] else: - metadata = metadata or [{} for _ in texts] + metadatas = metadatas or [{} for _ in texts] for i in range(0, len(texts), embedding_chunk_size): chunk_texts = texts[i : i + embedding_chunk_size] chunk_ids = ids[i : i + embedding_chunk_size] - chunk_metadatas = metadata[i : i + embedding_chunk_size] + chunk_metadatas = metadatas[i : i + embedding_chunk_size] embeddings = self._embed_documents(chunk_texts) for metadata, embedding, text in zip( @@ -589,7 +589,7 @@ def from_texts( aerospike.add_texts( texts, - metadata=metadatas, + metadatas=metadatas, ids=ids, index_name=index_name, embedding_chunk_size=embeddings_chunk_size, From 202c5b60fbe4161f55b4f51cf866dbdfda09804f Mon Sep 17 00:00:00 2001 From: Jesse Schumacher Date: Tue, 10 Sep 2024 16:39:37 -0700 Subject: [PATCH 15/23] fix linter --- .../vectorstores/aerospike.py | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/libs/community/langchain_community/vectorstores/aerospike.py b/libs/community/langchain_community/vectorstores/aerospike.py index f0b123df28b12..28448d3580b93 100644 --- a/libs/community/langchain_community/vectorstores/aerospike.py +++ b/libs/community/langchain_community/vectorstores/aerospike.py @@ -155,7 +155,7 @@ def convert_distance_strategy( def add_texts( self, texts: Iterable[str], - labels: Optional[List[dict[str, str]]] = None, + metadatas: Optional[List[dict]] = None, ids: Optional[List[str]] = None, set_name: Optional[str] = None, embedding_chunk_size: int = 1000, @@ -168,7 +168,7 @@ def add_texts( Args: texts: Iterable of strings to add to the vectorstore. - labels: Optional list of labels associated with the texts. + metadatas: Optional list of metadata associated with the texts. ids: Optional list of ids to associate with the texts. set_name: Optional aerospike set name to add the texts to. batch_size: Batch size to use when adding the texts to the vectorstore. @@ -197,24 +197,22 @@ def add_texts( ids = ids or [str(uuid.uuid4()) for _ in texts] # We need to shallow copy so that we can add the vector and text keys - if labels: - labels = [m.copy() for m in labels] + if metadatas: + metadatas = [m.copy() for m in metadatas] else: - labels = labels or [{} for _ in texts] + metadatas = metadatas or [{} for _ in texts] for i in range(0, len(texts), embedding_chunk_size): chunk_texts = texts[i : i + embedding_chunk_size] chunk_ids = ids[i : i + embedding_chunk_size] - chunk_labels = labels[i : i + embedding_chunk_size] + chunk_metadatas = metadatas[i : i + embedding_chunk_size] embeddings = self._embed_documents(chunk_texts) - for metadata, embedding, text in zip( - chunk_labels, embeddings, chunk_texts - ): + for metadata, embedding, text in zip(chunk_metadatas, embeddings, chunk_texts): metadata[self._vector_key] = embedding metadata[self._text_key] = text - for id, metadata in zip(chunk_ids, chunk_labels): + for id, metadata in zip(chunk_ids, chunk_metadatas): metadata[self._id_key] = id self._client.upsert( namespace=self._namespace, @@ -545,7 +543,7 @@ def from_texts( cls, texts: List[str], embedding: Embeddings, - labels: Optional[List[dict]] = None, + metadatas: Optional[List[dict]] = None, client: Client = None, namespace: str = "test", index_name: Optional[str] = None, @@ -589,7 +587,7 @@ def from_texts( aerospike.add_texts( texts, - labels=labels, + metadatas=metadatas, ids=ids, index_name=index_name, embedding_chunk_size=embeddings_chunk_size, From f6066bc968fff5324d2a3d29fdc4adfddcbd9381 Mon Sep 17 00:00:00 2001 From: Jesse Schumacher Date: Tue, 10 Sep 2024 16:41:22 -0700 Subject: [PATCH 16/23] revert pytoml --- libs/community/pyproject.toml | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/libs/community/pyproject.toml b/libs/community/pyproject.toml index 2ada3959723e3..1633f5ab29462 100644 --- a/libs/community/pyproject.toml +++ b/libs/community/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "langchain-community" -version = "0.2.16" +version = "0.2.12" description = "Community contributed LangChain integrations." authors = [] license = "MIT" @@ -30,15 +30,15 @@ ignore-words-list = "momento,collison,ned,foor,reworkd,parth,whats,aapply,mysogy [tool.poetry.dependencies] python = ">=3.8.1,<4.0" -langchain-core = "^0.2.38" -langchain = "^0.2.16" +langchain-core = "^0.2.30" +langchain = "^0.2.13" SQLAlchemy = ">=1.4,<3" requests = "^2" PyYAML = ">=5.3" aiohttp = "^3.8.3" tenacity = "^8.1.0,!=8.4.0" dataclasses-json = ">= 0.5.7, < 0.7" -langsmith = "^0.1.112" +langsmith = "^0.1.0" [[tool.poetry.dependencies.numpy]] version = "^1" python = "<3.12" @@ -54,8 +54,9 @@ select = [ "E", "F", "I", "T201",] omit = [ "tests/*",] [tool.pytest.ini_options] -addopts = "--strict-markers --strict-config --durations=5 -vv" +addopts = "--strict-markers --strict-config --durations=5 --snapshot-warn-unused -vv" markers = [ "requires: mark tests as requiring a specific library", "scheduled: mark tests to run in scheduled testing", "compile: mark placeholder test used to compile integration tests without running them",] +asyncio_mode = "auto" [tool.poetry.group.test] optional = true @@ -94,6 +95,15 @@ codespell = "^2.2.0" [tool.poetry.group.test_integration.dependencies] pytest-vcr = "^1.0.2" vcrpy = "^6" +wrapt = "^1.15.0" +openai = "^1" +python-dotenv = "^1.0.0" +cassio = "^0.1.6" +tiktoken = ">=0.3.2,<0.6.0" +anthropic = "^0.3.11" +fireworks-ai = "^0.9.0" +vdms = ">=0.0.20" +exllamav2 = "^0.0.18" [tool.poetry.group.lint.dependencies] ruff = "^0.5" @@ -124,6 +134,14 @@ develop = true path = "../standard-tests" develop = true +[tool.poetry.group.test_integration.dependencies.langchain-core] +path = "../core" +develop = true + +[tool.poetry.group.test_integration.dependencies.langchain] +path = "../langchain" +develop = true + [tool.poetry.group.dev.dependencies.langchain-core] path = "../core" develop = true From baaa8f1ae774f14cda3361f67174c6e814cccee4 Mon Sep 17 00:00:00 2001 From: Jesse Schumacher Date: Tue, 10 Sep 2024 16:45:00 -0700 Subject: [PATCH 17/23] revert pyproject.toml --- libs/community/pyproject.toml | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/libs/community/pyproject.toml b/libs/community/pyproject.toml index 1633f5ab29462..bd50a7352d048 100644 --- a/libs/community/pyproject.toml +++ b/libs/community/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "langchain-community" -version = "0.2.12" +version = "0.2.16" description = "Community contributed LangChain integrations." authors = [] license = "MIT" @@ -30,15 +30,15 @@ ignore-words-list = "momento,collison,ned,foor,reworkd,parth,whats,aapply,mysogy [tool.poetry.dependencies] python = ">=3.8.1,<4.0" -langchain-core = "^0.2.30" -langchain = "^0.2.13" +langchain-core = "^0.2.38" +langchain = "^0.2.16" SQLAlchemy = ">=1.4,<3" requests = "^2" PyYAML = ">=5.3" aiohttp = "^3.8.3" tenacity = "^8.1.0,!=8.4.0" dataclasses-json = ">= 0.5.7, < 0.7" -langsmith = "^0.1.0" +langsmith = "^0.1.112" [[tool.poetry.dependencies.numpy]] version = "^1" python = "<3.12" @@ -95,15 +95,6 @@ codespell = "^2.2.0" [tool.poetry.group.test_integration.dependencies] pytest-vcr = "^1.0.2" vcrpy = "^6" -wrapt = "^1.15.0" -openai = "^1" -python-dotenv = "^1.0.0" -cassio = "^0.1.6" -tiktoken = ">=0.3.2,<0.6.0" -anthropic = "^0.3.11" -fireworks-ai = "^0.9.0" -vdms = ">=0.0.20" -exllamav2 = "^0.0.18" [tool.poetry.group.lint.dependencies] ruff = "^0.5" @@ -134,14 +125,6 @@ develop = true path = "../standard-tests" develop = true -[tool.poetry.group.test_integration.dependencies.langchain-core] -path = "../core" -develop = true - -[tool.poetry.group.test_integration.dependencies.langchain] -path = "../langchain" -develop = true - [tool.poetry.group.dev.dependencies.langchain-core] path = "../core" develop = true From 73d237ef4a902d469e5af60fdd77c65b34b08afa Mon Sep 17 00:00:00 2001 From: Jesse Schumacher Date: Tue, 10 Sep 2024 16:50:11 -0700 Subject: [PATCH 18/23] fix lint --- libs/community/langchain_community/vectorstores/aerospike.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/community/langchain_community/vectorstores/aerospike.py b/libs/community/langchain_community/vectorstores/aerospike.py index 28448d3580b93..997646a00f98a 100644 --- a/libs/community/langchain_community/vectorstores/aerospike.py +++ b/libs/community/langchain_community/vectorstores/aerospike.py @@ -208,7 +208,9 @@ def add_texts( chunk_metadatas = metadatas[i : i + embedding_chunk_size] embeddings = self._embed_documents(chunk_texts) - for metadata, embedding, text in zip(chunk_metadatas, embeddings, chunk_texts): + for metadata, embedding, text in zip( + chunk_metadatas, embeddings, chunk_texts + ): metadata[self._vector_key] = embedding metadata[self._text_key] = text From bd6e4a3fbcd7d2d29e2f69c4e1b0b47b77a1910f Mon Sep 17 00:00:00 2001 From: Jesse Schumacher Date: Wed, 25 Sep 2024 13:32:55 -0700 Subject: [PATCH 19/23] rm proximus name --- .../docker-compose/aerospike/aerospike-vector-search.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike-vector-search.yml b/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike-vector-search.yml index 834c9afb69dfb..542f0ef815329 100644 --- a/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike-vector-search.yml +++ b/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike-vector-search.yml @@ -3,7 +3,7 @@ cluster: # Unique identifier for this cluster. cluster-name: aerospike-vector -# The Proximus service listening ports, TLS and network interface. +# The AVS service listening ports, TLS and network interface. service: ports: 5002: From 22c57a5997d1cd5bbe0fe769334682cc6bef3916 Mon Sep 17 00:00:00 2001 From: dylan Date: Tue, 29 Oct 2024 15:12:50 -0700 Subject: [PATCH 20/23] chore: vec-411 update notebook to use Python client 3.0.0 and test docker compose to use AVS 0.11.1 --- docs/docs/integrations/vectorstores/aerospike.ipynb | 2 +- .../vectorstores/docker-compose/aerospike/docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/integrations/vectorstores/aerospike.ipynb b/docs/docs/integrations/vectorstores/aerospike.ipynb index 88b8a2a85dba4..e51f961d8d6c9 100644 --- a/docs/docs/integrations/vectorstores/aerospike.ipynb +++ b/docs/docs/integrations/vectorstores/aerospike.ipynb @@ -51,7 +51,7 @@ }, "outputs": [], "source": [ - "!pip install --upgrade --quiet aerospike-vector-search==2.0.0 langchain-community sentence-transformers langchain" + "!pip install --upgrade --quiet aerospike-vector-search==3.0.0 langchain-community sentence-transformers langchain" ] }, { diff --git a/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/docker-compose.yml b/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/docker-compose.yml index 40254fd58b23a..143348a667e6e 100644 --- a/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/docker-compose.yml +++ b/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/docker-compose.yml @@ -11,7 +11,7 @@ services: - "--config-file" - "/opt/aerospike/etc/aerospike/aerospike.conf" avs: - image: aerospike/aerospike-vector-search:0.10.0 + image: aerospike/aerospike-vector-search:0.11.1 ports: - "5002:5002" networks: From 3f81c8c6f3ef1c95114f12005584dcb883b6b3fa Mon Sep 17 00:00:00 2001 From: dylan Date: Wed, 30 Oct 2024 15:08:27 -0700 Subject: [PATCH 21/23] use AVS Python client 3.0.1 in vector store notebook --- docs/docs/integrations/vectorstores/aerospike.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/integrations/vectorstores/aerospike.ipynb b/docs/docs/integrations/vectorstores/aerospike.ipynb index e51f961d8d6c9..17f9fda39f930 100644 --- a/docs/docs/integrations/vectorstores/aerospike.ipynb +++ b/docs/docs/integrations/vectorstores/aerospike.ipynb @@ -51,7 +51,7 @@ }, "outputs": [], "source": [ - "!pip install --upgrade --quiet aerospike-vector-search==3.0.0 langchain-community sentence-transformers langchain" + "!pip install --upgrade --quiet aerospike-vector-search==3.0.1 langchain-community sentence-transformers langchain" ] }, { From e4a0ef76485516796d6126437c0be68beede5a78 Mon Sep 17 00:00:00 2001 From: Erick Friis Date: Fri, 13 Dec 2024 16:10:45 -0800 Subject: [PATCH 22/23] x --- .../aerospike/aerospike-proximus.yml | 36 +++++++++++++++++++ .../docker-compose/aerospike/aerospike.conf | 2 +- .../aerospike/docker-compose.yml | 6 ++-- 3 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike-proximus.yml diff --git a/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike-proximus.yml b/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike-proximus.yml new file mode 100644 index 0000000000000..248706780657a --- /dev/null +++ b/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike-proximus.yml @@ -0,0 +1,36 @@ +cluster: + + # Unique identifier for this cluster. + cluster-name: aerospike-vector + +# The Proximus service listening ports, TLS and network interface. +service: + ports: + 5002: {} + # Uncomment for local debugging + advertised-listeners: + default: + address: 127.0.0.1 + port: 5002 + +# Management API listening ports, TLS and network interface. +manage: + ports: + 5040: {} + +# Intra cluster interconnect listening ports, TLS and network interface. +interconnect: + ports: + 5001: {} + +# Target Aerospike cluster +aerospike: + seeds: + - aerospike: + port: 3000 + +# The logging properties. +logging: + enable-console-logging: true + levels: + metrics-ticker: off diff --git a/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike.conf b/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike.conf index 391986e115a8a..fba3a7a33e961 100644 --- a/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike.conf +++ b/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike.conf @@ -51,7 +51,7 @@ namespace test { } } -namespace avs-meta { +namespace proximus-meta { replication-factor 1 nsup-period 100 diff --git a/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/docker-compose.yml b/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/docker-compose.yml index 143348a667e6e..ea6642dfc971f 100644 --- a/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/docker-compose.yml +++ b/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/docker-compose.yml @@ -10,14 +10,14 @@ services: command: - "--config-file" - "/opt/aerospike/etc/aerospike/aerospike.conf" - avs: - image: aerospike/aerospike-vector-search:0.11.1 + proximus: + image: aerospike/aerospike-proximus:0.4.0 ports: - "5002:5002" networks: - aerospike-test volumes: - - .:/etc/aerospike-vector-search + - .:/etc/aerospike-proximus networks: aerospike-test: {} From ea63e2e80a28e75b71eac2418b3e9baf98fc805e Mon Sep 17 00:00:00 2001 From: Erick Friis Date: Fri, 13 Dec 2024 16:12:27 -0800 Subject: [PATCH 23/23] x --- .../docker-compose/aerospike/.gitignore | 1 - .../aerospike/aerospike-vector-search.yml | 36 ------------------- 2 files changed, 37 deletions(-) delete mode 100644 libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/.gitignore delete mode 100644 libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike-vector-search.yml diff --git a/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/.gitignore b/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/.gitignore deleted file mode 100644 index b884250a88c58..0000000000000 --- a/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/.gitignore +++ /dev/null @@ -1 +0,0 @@ -features.conf \ No newline at end of file diff --git a/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike-vector-search.yml b/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike-vector-search.yml deleted file mode 100644 index 542f0ef815329..0000000000000 --- a/libs/community/tests/integration_tests/vectorstores/docker-compose/aerospike/aerospike-vector-search.yml +++ /dev/null @@ -1,36 +0,0 @@ -cluster: - - # Unique identifier for this cluster. - cluster-name: aerospike-vector - -# The AVS service listening ports, TLS and network interface. -service: - ports: - 5002: - advertised-listeners: - default: - address: 127.0.0.1 - port: 5002 - -# Management API listening ports, TLS and network interface. -manage: - ports: - 5040: {} - -# Intra cluster interconnect listening ports, TLS and network interface. -interconnect: - ports: - 5001: {} - -# Target Aerospike cluster -storage: - seeds: - - aerospike: - port: 3000 - -# The logging properties. -logging: - enable-console-logging: true - file: "/etc/aerospike-vector-search/avs.log" - levels: - metrics-ticker: info