Skip to content

Commit ac8a7f5

Browse files
authored
Housekeeping (#2086)
* Add deprecation warnings for fnllm and multi-search * Fix dangling token_encoder refs * Fix local_search notebook * Fix global search dynamic notebook * Fix global search notebook * Fix drift notebook * Switch example notebooks to use LiteLLM config * Properly annotate dev deps as a group * Semver * Remove --extra dev * Remove llm_model variable * Ignore ruff ASYNC240 * Add note about expected broken notebook in docs * Fix custom vector store notebook * Push tokenizer throughout
1 parent 6c86b0a commit ac8a7f5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+554
-519
lines changed

.github/workflows/gh-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
- name: Install dependencies
3333
shell: bash
34-
run: uv sync --extra dev
34+
run: uv sync
3535

3636
- name: mkdocs build
3737
shell: bash

.github/workflows/python-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
- name: Install dependencies
6868
shell: bash
6969
run: |
70-
uv sync --extra dev
70+
uv sync
7171
uv pip install gensim
7272
7373
- name: Check

.github/workflows/python-integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
- name: Install dependencies
6868
shell: bash
6969
run: |
70-
uv sync --extra dev
70+
uv sync
7171
uv pip install gensim
7272
7373
- name: Build

.github/workflows/python-notebook-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
- name: Install dependencies
6868
shell: bash
6969
run: |
70-
uv sync --extra dev
70+
uv sync
7171
uv pip install gensim
7272
7373
- name: Notebook Test

.github/workflows/python-smoke-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
- name: Install dependencies
7373
shell: bash
7474
run: |
75-
uv sync --extra dev
75+
uv sync
7676
uv pip install gensim
7777
7878
- name: Build
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "patch",
3+
"description": "Housekeeping toward 2.7."
4+
}

DEVELOPING.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,8 @@
1111

1212
## Install Dependencies
1313
```shell
14-
# (optional) create virtual environment
15-
uv venv --python 3.10
16-
source .venv/bin/activate
17-
1814
# install python dependencies
19-
uv sync --extra dev
15+
uv sync
2016
```
2117

2218
## Execute the indexing engine

docs/developing.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,8 @@
1212
## Install Dependencies
1313

1414
```sh
15-
# (optional) create virtual environment
16-
uv venv --python 3.10
17-
source .venv/bin/activate
18-
1915
# install python dependencies
20-
uv sync --extra dev
16+
uv sync
2117
```
2218

2319
## Execute the Indexing Engine

docs/examples_notebooks/api_overview.ipynb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@
6767
"metadata": {},
6868
"outputs": [],
6969
"source": [
70+
"# note that we expect this to fail on the deployed docs because the PROJECT_DIRECTORY is not set to a real location.\n",
71+
"# if you run this notebook locally, make sure to point at a location containing your settings.yaml\n",
7072
"graphrag_config = load_config(Path(PROJECT_DIRECTORY))"
7173
]
7274
},

docs/examples_notebooks/custom_vector_store.ipynb

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
"import numpy as np\n",
6262
"import yaml\n",
6363
"\n",
64+
"from graphrag.config.models.vector_store_schema_config import VectorStoreSchemaConfig\n",
6465
"from graphrag.data_model.types import TextEmbedder\n",
6566
"\n",
6667
"# GraphRAG vector store components\n",
@@ -147,14 +148,12 @@
147148
" self.vectors: dict[str, np.ndarray] = {}\n",
148149
" self.connected = False\n",
149150
"\n",
150-
" print(\n",
151-
" f\"🚀 SimpleInMemoryVectorStore initialized for collection: {self.collection_name}\"\n",
152-
" )\n",
151+
" print(f\"🚀 SimpleInMemoryVectorStore initialized for index: {self.index_name}\")\n",
153152
"\n",
154153
" def connect(self, **kwargs: Any) -> None:\n",
155154
" \"\"\"Connect to the vector storage (no-op for in-memory store).\"\"\"\n",
156155
" self.connected = True\n",
157-
" print(f\"✅ Connected to in-memory vector store: {self.collection_name}\")\n",
156+
" print(f\"✅ Connected to in-memory vector store: {self.index_name}\")\n",
158157
"\n",
159158
" def load_documents(\n",
160159
" self, documents: list[VectorStoreDocument], overwrite: bool = True\n",
@@ -250,7 +249,7 @@
250249
" def get_stats(self) -> dict[str, Any]:\n",
251250
" \"\"\"Get statistics about the vector store (custom method).\"\"\"\n",
252251
" return {\n",
253-
" \"collection_name\": self.collection_name,\n",
252+
" \"index_name\": self.index_name,\n",
254253
" \"document_count\": len(self.documents),\n",
255254
" \"vector_count\": len(self.vectors),\n",
256255
" \"connected\": self.connected,\n",
@@ -353,11 +352,11 @@
353352
"outputs": [],
354353
"source": [
355354
"# Test creating vector store using the factory\n",
356-
"vector_store_config = {\"collection_name\": \"test_collection\"}\n",
355+
"schema = VectorStoreSchemaConfig(index_name=\"test_collection\")\n",
357356
"\n",
358357
"# Create vector store instance using factory\n",
359358
"vector_store = VectorStoreFactory.create_vector_store(\n",
360-
" CUSTOM_VECTOR_STORE_TYPE, vector_store_config\n",
359+
" CUSTOM_VECTOR_STORE_TYPE, vector_store_schema_config=schema\n",
361360
")\n",
362361
"\n",
363362
"print(f\"✅ Created vector store instance: {type(vector_store).__name__}\")\n",
@@ -486,9 +485,13 @@
486485
" print(\"🚀 Simulating GraphRAG pipeline with custom vector store...\\n\")\n",
487486
"\n",
488487
" # 1. GraphRAG creates vector store using factory\n",
489-
" config = {\"collection_name\": \"graphrag_entities\", \"similarity_threshold\": 0.3}\n",
488+
" schema = VectorStoreSchemaConfig(index_name=\"graphrag_entities\")\n",
490489
"\n",
491-
" store = VectorStoreFactory.create_vector_store(CUSTOM_VECTOR_STORE_TYPE, config)\n",
490+
" store = VectorStoreFactory.create_vector_store(\n",
491+
" CUSTOM_VECTOR_STORE_TYPE,\n",
492+
" vector_store_schema_config=schema,\n",
493+
" similarity_threshold=0.3,\n",
494+
" )\n",
492495
" store.connect()\n",
493496
"\n",
494497
" print(\"✅ Step 1: Vector store created and connected\")\n",
@@ -549,7 +552,8 @@
549552
" # Test 1: Basic functionality\n",
550553
" print(\"Test 1: Basic functionality\")\n",
551554
" store = VectorStoreFactory.create_vector_store(\n",
552-
" CUSTOM_VECTOR_STORE_TYPE, {\"collection_name\": \"test\"}\n",
555+
" CUSTOM_VECTOR_STORE_TYPE,\n",
556+
" vector_store_schema_config=VectorStoreSchemaConfig(index_name=\"test\"),\n",
553557
" )\n",
554558
" store.connect()\n",
555559
"\n",
@@ -597,7 +601,8 @@
597601
" # Test 5: Error handling\n",
598602
" print(\"\\nTest 5: Error handling\")\n",
599603
" disconnected_store = VectorStoreFactory.create_vector_store(\n",
600-
" CUSTOM_VECTOR_STORE_TYPE, {\"collection_name\": \"test2\"}\n",
604+
" CUSTOM_VECTOR_STORE_TYPE,\n",
605+
" vector_store_schema_config=VectorStoreSchemaConfig(index_name=\"test2\"),\n",
601606
" )\n",
602607
"\n",
603608
" try:\n",
@@ -653,7 +658,7 @@
653658
],
654659
"metadata": {
655660
"kernelspec": {
656-
"display_name": "graphrag-venv (3.10.18)",
661+
"display_name": "graphrag",
657662
"language": "python",
658663
"name": "python3"
659664
},
@@ -667,7 +672,7 @@
667672
"name": "python",
668673
"nbconvert_exporter": "python",
669674
"pygments_lexer": "ipython3",
670-
"version": "3.10.18"
675+
"version": "3.12.10"
671676
}
672677
},
673678
"nbformat": 4,

0 commit comments

Comments
 (0)