Skip to content

Commit f7e01fe

Browse files
Merge branch 'main' into encoder
2 parents 16fcc92 + 82cd3b7 commit f7e01fe

30 files changed

+831
-334
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "minor",
3+
"description": "Add config for NLP async mode."
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "minor",
3+
"description": "add customization to vector store"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "patch",
3+
"description": "Remove hard-coded community rate limiter."
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "patch",
3+
"description": "Fix multi-index search."
4+
}

.vscode/launch.json

Lines changed: 47 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,24 @@
66
"name": "Indexer",
77
"type": "debugpy",
88
"request": "launch",
9-
"module": "uv",
9+
"module": "graphrag",
1010
"args": [
11-
"poe", "index",
12-
"--root", "<path_to_ragtest_root_demo>"
11+
"index",
12+
"--root",
13+
"<path_to_index_folder>"
1314
],
15+
"console": "integratedTerminal"
1416
},
1517
{
1618
"name": "Query",
1719
"type": "debugpy",
1820
"request": "launch",
19-
"module": "uv",
21+
"module": "graphrag",
2022
"args": [
21-
"poe", "query",
22-
"--root", "<path_to_ragtest_root_demo>",
23-
"--method", "global",
23+
"query",
24+
"--root",
25+
"<path_to_index_folder>",
26+
"--method", "basic",
2427
"--query", "What are the top themes in this story",
2528
]
2629
},
@@ -34,6 +37,42 @@
3437
"--config",
3538
"<path_to_ragtest_root_demo>/settings.yaml",
3639
]
37-
}
40+
},
41+
{
42+
"name": "Debug Integration Pytest",
43+
"type": "debugpy",
44+
"request": "launch",
45+
"module": "pytest",
46+
"args": [
47+
"./tests/integration/vector_stores",
48+
"-k", "test_azure_ai_search"
49+
],
50+
"console": "integratedTerminal",
51+
"justMyCode": false
52+
},
53+
{
54+
"name": "Debug Verbs Pytest",
55+
"type": "debugpy",
56+
"request": "launch",
57+
"module": "pytest",
58+
"args": [
59+
"./tests/verbs",
60+
"-k", "test_generate_text_embeddings"
61+
],
62+
"console": "integratedTerminal",
63+
"justMyCode": false
64+
},
65+
{
66+
"name": "Debug Smoke Pytest",
67+
"type": "debugpy",
68+
"request": "launch",
69+
"module": "pytest",
70+
"args": [
71+
"./tests/smoke",
72+
"-k", "test_fixtures"
73+
],
74+
"console": "integratedTerminal",
75+
"justMyCode": false
76+
},
3877
]
3978
}

docs/get_started.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,10 @@ deployment_name: <azure_model_deployment_name>
6565
```
6666
6767
#### Using Managed Auth on Azure
68-
To use managed auth, add an additional value to your model config and comment out or remove the api_key line:
68+
To use managed auth, edit the auth_type in your model config and *remove* the api_key line:
6969
7070
```yaml
7171
auth_type: azure_managed_identity # Default auth_type is is api_key
72-
# api_key: ${GRAPHRAG_API_KEY}
7372
```
7473
7574
You will also need to login with [az login](https://learn.microsoft.com/en-us/cli/azure/authenticate-azure-cli) and select the subscription with your endpoint.
@@ -116,4 +115,4 @@ Please refer to [Query Engine](query/overview.md) docs for detailed information
116115
- For more details about configuring GraphRAG, see the [configuration documentation](config/overview.md).
117116
- To learn more about Initialization, refer to the [Initialization documentation](config/init.md).
118117
- For more details about using the CLI, refer to the [CLI documentation](cli.md).
119-
- Check out our [visualization guide](visualization_guide.md) for a more interactive experience in debugging and exploring the knowledge graph.
118+
- Check out our [visualization guide](visualization_guide.md) for a more interactive experience in debugging and exploring the knowledge graph.

graphrag/cache/factory.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,19 @@ def create_cosmosdb_cache(**kwargs) -> PipelineCache:
9797
return JsonPipelineCache(storage)
9898

9999

100+
def create_noop_cache(**_kwargs) -> PipelineCache:
101+
"""Create a no-op cache implementation."""
102+
return NoopPipelineCache()
103+
104+
105+
def create_memory_cache(**kwargs) -> PipelineCache:
106+
"""Create a memory cache implementation."""
107+
return InMemoryCache(**kwargs)
108+
109+
100110
# --- register built-in cache implementations ---
101-
CacheFactory.register(CacheType.none.value, NoopPipelineCache)
102-
CacheFactory.register(CacheType.memory.value, InMemoryCache)
111+
CacheFactory.register(CacheType.none.value, create_noop_cache)
112+
CacheFactory.register(CacheType.memory.value, create_memory_cache)
103113
CacheFactory.register(CacheType.file.value, create_file_cache)
104114
CacheFactory.register(CacheType.blob.value, create_blob_cache)
105115
CacheFactory.register(CacheType.cosmosdb.value, create_cosmosdb_cache)

graphrag/config/defaults.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ class ExtractGraphNLPDefaults:
246246
normalize_edge_weights: bool = True
247247
text_analyzer: TextAnalyzerDefaults = field(default_factory=TextAnalyzerDefaults)
248248
concurrent_requests: int = 25
249+
async_mode: AsyncType = AsyncType.Threaded
249250

250251

251252
@dataclass
@@ -427,6 +428,7 @@ class VectorStoreDefaults:
427428
api_key: None = None
428429
audience: None = None
429430
database_name: None = None
431+
schema: None = None
430432

431433

432434
@dataclass

graphrag/config/embeddings.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@
2929
]
3030

3131

32-
def create_collection_name(
32+
def create_index_name(
3333
container_name: str, embedding_name: str, validate: bool = True
3434
) -> str:
3535
"""
36-
Create a collection name for the embedding store.
36+
Create a index name for the embedding store.
3737
3838
Within any given vector store, we can have multiple sets of embeddings organized into projects.
39-
The `container` param is used for this partitioning, and is added as a prefix to the collection name for differentiation.
39+
The `container` param is used for this partitioning, and is added as a prefix to the index name for differentiation.
4040
4141
The embedding name is fixed, with the available list defined in graphrag.index.config.embeddings
4242

graphrag/config/init_content.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@
112112
extract_graph_nlp:
113113
text_analyzer:
114114
extractor_type: {graphrag_config_defaults.extract_graph_nlp.text_analyzer.extractor_type.value} # [regex_english, syntactic_parser, cfg]
115+
async_mode: {graphrag_config_defaults.extract_graph_nlp.async_mode.value} # or asyncio
115116
116117
cluster_graph:
117118
max_cluster_size: {graphrag_config_defaults.cluster_graph.max_cluster_size}

0 commit comments

Comments
 (0)