Skip to content

Commit 41c7af6

Browse files
committed
bugfix for lancedb uri parsing when using an object store
1 parent d39ebed commit 41c7af6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/graphrag/graphrag/config/models/graph_rag_config.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,11 @@ def _validate_vector_store_db_uri(self) -> None:
262262
"""Validate the vector store configuration."""
263263
store = self.vector_store
264264
if store.type == VectorStoreType.LanceDB:
265-
if not store.db_uri or store.db_uri.strip == "":
265+
if not store.db_uri or store.db_uri.strip() == "":
266266
store.db_uri = graphrag_config_defaults.vector_store.db_uri
267-
store.db_uri = str(Path(store.db_uri).resolve())
267+
# Only convert to a filesystem path if the URI is not for object store
268+
if not store.db_uri.startswith(("az://", "s3://", "gs://")):
269+
store.db_uri = str(Path(store.db_uri).resolve())
268270

269271
def get_completion_model_config(self, model_id: str) -> ModelConfig:
270272
"""Get a completion model configuration by ID.

0 commit comments

Comments
 (0)