Skip to content

Commit 4844305

Browse files
committed
bugfix for lancedb uri parsing when using an object store
1 parent e3278c0 commit 4844305

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,11 @@ def _validate_vector_store_db_uri(self) -> None:
268268
"""Validate the vector store configuration."""
269269
store = self.vector_store
270270
if store.type == VectorStoreType.LanceDB:
271-
if not store.db_uri or store.db_uri.strip == "":
271+
if not store.db_uri or store.db_uri.strip() == "":
272272
store.db_uri = graphrag_config_defaults.vector_store.db_uri
273-
store.db_uri = str(Path(store.db_uri).resolve())
273+
# Only convert to a filesystem path if the URI is not for object store
274+
if not store.db_uri.startswith(("az://", "s3://", "gs://")):
275+
store.db_uri = str(Path(store.db_uri).resolve())
274276

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

0 commit comments

Comments
 (0)