activeloopai / deeplake

Database for AI. Store Vectors, Images, Texts, Videos, etc. Use with LLMs/LangChain. Store, query, version, & visualize any AI data. Stream data in real-time to PyTorch/TensorFlow. https://activeloop.ai

Home Page:https://activeloop.ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] Error when Adding Documents to DeepLake Dataset - LockedException

mike2k11 opened this issue · comments

Description

Issue Description:

I encountered an issue while trying to add documents to a DeepLake dataset in an Azure container. I am the only user of this dataset, but I'm randomly getting an error that prevents me from adding more documents. The error message I received is as follows:

Error Message
deeplake.util.exceptions.LockedException: This dataset cannot be open for writing as it is locked by another machine. Try loading the dataset with read_only=True.

Steps to Reproduce:

Create a new DeepLake dataset in an Azure container.
Attempt to add more documents to the dataset using the following command:

from langchain.vectorstores import DeepLake
db = DeepLake.from_documents(
pages,
dataset_path=f"azure://{storage_account_name}/{container_name}/default_v4",
embedding=embeddings,
creds=creds
)

Expected Behavior:

I expect to be able to add more documents to the dataset without encountering any errors since I'm the only user of the dataset.

Actual Behavior:

I'm randomly encountering the LockedException error mentioned above, which prevents me from adding documents to the dataset.

Additional Information:

I am the only user of this dataset, so there shouldn't be any locking conflicts with other machines.
The error suggests using read_only=True when loading the dataset, but this is not a feasible solution for my use case as I need to add new documents to the dataset.
Environment:

Langchain Version: : 0.0.266
Python Version: 3.10.11

Screenshots:
image

Use Cases

No response

Can confirm

Hi @herrjemand Thank you for raising the issue. Is there any chance that you opened the dataset in another container or machine? That's critical because the locks are machine based, and not username-based.

Can you send the complete error message? Knowing which lock is stuck will help diagnose the problem.

Are you able to provide any more information, @herrjemand or @mike2k11 to help troubleshoot?

hey @herrjemand,

I hope you are doing well. I am checking in to see if the issue you were experiencing is still ongoing. If not, that’s perfectly fine, but our team is always happy to assist you in fully utilizing Deep Lake. I will close this issue for now, but if the problem persists, please feel free to respond to this email or continue chatting with us.

By the way, we will be releasing the new version of our Managed Tensor Database shortly, which abstracts away issues like this. Stay tuned!

Best regards,
Mikayel