Verba icon indicating copy to clipboard operation
Verba copied to clipboard

[bug] Verba saves data in XDG_DATA_HOME (not ~/.local/share/weaviate)

Open LFd3v opened this issue 1 year ago • 4 comments

Description

Basically what the title says.

Is this a bug or a feature?

  • [x] Bug
  • [ ] Feature

Steps to Reproduce

  1. Install Verba (https://github.com/weaviate/Verba#how-to-deploy-with-pip)
  2. Start Verba (it will download weaviate-embedded)
  3. Configure it to use Ollama
  4. Import a document
  5. Many files and directories with "verba" in their names, among other files, will be created ~/.local/share (i.e. XDG_DATA_HOME), there is no ~/.local/share/weaviate as shown in README

Additional context

First of all, thank you a lot for developing, maintaining and providing the nice too as Open Source.

Environment:

  1. ArchLinux
  2. Pyhton 3.12
  3. I actually have XDG_DATA_HOME defined in the login shell, maybe it makes some difference in your code

Please feel free to ask for more info if needed.

Regards

LFd3v avatar May 23 '24 02:05 LFd3v

Nice catch! Thanks, I'll update the README

thomashacker avatar May 23 '24 13:05 thomashacker

@thomashacker Thank you for your reply. Actually, wouldn't it better to actually create a folder in XDG_HOME_DATA (i.e. ~/.local/share) and to store the files there? This is the normal and expected behavior (and the main issue here is not documentation or a request to update the README).

Thanks again. Regards.

LFd3v avatar May 23 '24 13:05 LFd3v

Verba is using Weaviate Embedded (https://weaviate.io/developers/weaviate/installation/embedded) per default, if no Weaviate Cluster is detected in the .env file. Weaviate automatically checks the XDG_HOME_DATA variable to save the data if not specified otherwise. I think, in this case, improving the documentation will make it clearer for users

thomashacker avatar May 23 '24 14:05 thomashacker

Sure, agreed. But from what I recall reading it:

  1. I does state that it would use weaviate-embedded if there is no other setup available (but indeed also adding the info that it will then be downloaded and installed locally would make it clear, and also let the user known that something else will be downloaded and installed automatically beforehand, what is always a good thing IMHO);
  2. It is using XDG_DATA_HOME (which is ~/.local/share if not state otherwise), but it is not using its own folder inside it as expected (and recommended).

Again, the main problem that I meant to report here is that all the files and folders are created inside XDG_DATA_HOME (or ~/.local/share) instead of creating a new folder there and then saving the working files inside this folder.

Or, in other others, it should save the files in ~/.local/share/weaviate (or $XDG_DATA_HOME/weaviate) as shown in the README, but it actually doesn't do it, so all the files and folders are scattered inside ~/.local/share.

I am sorry if this wasn't cleat before. Thank you again. Regards.

LFd3v avatar May 23 '24 14:05 LFd3v

Good point! I'll look into documenting it better and fix the issue with data scattered inside $XDG_DATA_HOME

thomashacker avatar May 27 '24 11:05 thomashacker