Skip to content

Commit 27b4657

Browse files
committed
bugfix for lancedb uri parsing when using an object store
1 parent 47fae95 commit 27b4657

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
@@ -270,9 +270,11 @@ def _validate_vector_store_db_uri(self) -> None:
270270
"""Validate the vector store configuration."""
271271
store = self.vector_store
272272
if store.type == VectorStoreType.LanceDB:
273-
if not store.db_uri or store.db_uri.strip == "":
273+
if not store.db_uri or store.db_uri.strip() == "":
274274
store.db_uri = graphrag_config_defaults.vector_store.db_uri
275-
store.db_uri = str(Path(store.db_uri).resolve())
275+
# Only convert to a filesystem path if the URI is not for object store
276+
if not store.db_uri.startswith(("az://", "s3://", "gs://")):
277+
store.db_uri = str(Path(store.db_uri).resolve())
276278

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

0 commit comments

Comments
 (0)