mirror of
https://github.com/hwchase17/langchain
synced 2024-11-06 03:20:49 +00:00
Activeloopai runtime arg (#9961)
This commit is contained in:
commit
c70bb0ec28
@ -62,6 +62,7 @@ class DeepLake(VectorStore):
|
||||
num_workers: int = 0,
|
||||
verbose: bool = True,
|
||||
exec_option: Optional[str] = None,
|
||||
runtime: Optional[Dict] = None,
|
||||
**kwargs: Any,
|
||||
) -> None:
|
||||
"""Creates an empty DeepLakeVectorStore or loads an existing one.
|
||||
@ -77,7 +78,7 @@ class DeepLake(VectorStore):
|
||||
>>> # Create a vector store in the Deep Lake Managed Tensor Database
|
||||
>>> data = DeepLake(
|
||||
... path = "hub://org_id/dataset_name",
|
||||
... exec_option = "tensor_db",
|
||||
... runtime = {"tensor_db": True},
|
||||
... )
|
||||
|
||||
Args:
|
||||
@ -114,6 +115,10 @@ class DeepLake(VectorStore):
|
||||
responsible for storage and query execution. Only for data stored in
|
||||
the Deep Lake Managed Database. Use runtime = {"db_engine": True}
|
||||
during dataset creation.
|
||||
runtime (Dict, optional): Parameters for creating the Vector Store in
|
||||
Deep Lake's Managed Tensor Database. Not applicable when loading an
|
||||
existing Vector Store. To create a Vector Store in the Managed Tensor
|
||||
Database, set `runtime = {"tensor_db": True}`.
|
||||
**kwargs: Other optional keyword arguments.
|
||||
|
||||
Raises:
|
||||
@ -131,11 +136,12 @@ class DeepLake(VectorStore):
|
||||
)
|
||||
|
||||
if (
|
||||
kwargs.get("runtime") == {"tensor_db": True}
|
||||
runtime == {"tensor_db": True}
|
||||
and version_compare(deeplake.__version__, "3.6.7") == -1
|
||||
):
|
||||
raise ImportError(
|
||||
"To use tensor_db option you need to update deeplake to `3.6.7`. "
|
||||
"To use tensor_db option you need to update deeplake to `3.6.7` or "
|
||||
"higher. "
|
||||
f"Currently installed deeplake version is {deeplake.__version__}. "
|
||||
)
|
||||
|
||||
@ -154,6 +160,7 @@ class DeepLake(VectorStore):
|
||||
token=token,
|
||||
exec_option=exec_option,
|
||||
verbose=verbose,
|
||||
runtime=runtime,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user