Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error reading (making smart connections) with Open Ai Embeddings. #756

Open
bbecausereasonss opened this issue Sep 2, 2024 · 24 comments
Open

Comments

@bbecausereasonss
Copy link

bbecausereasonss commented Sep 2, 2024

Finally, managed to create OpenAi (Embeddings)... I think... using Smart-Connect. However, each time I open Obsidian it crashes/freezes on Making Smart Connections.

image

@brianpetro
Copy link
Owner

@bbecausereasonss it might be worth trying only one of Smart Connect app or the Smart Connections Obsidian plugin at a time until the embeddings issue gets sorted out.

While they both are able to make the embeddings, there isn't the same "offloading" integration as there was before, which could cause interference if both softwares are attempting to embed at the same time.

The "offloading" integration (improving Obsidian performance by offloading heavy processes to Smart Connect app) will be reintroduced shortly, but for now, since you're having issues with the embedding, it's probably worth trying just one of those softwares at a time. Lastly, when quitting the Smart Connect app, make sure to do it from the task tray (typically bottom right, near volume setting on windows) to ensure it is completely turned off 🌴

@bbecausereasonss
Copy link
Author

bbecausereasonss commented Sep 2, 2024

@bbecausereasonss it might be worth trying only one of Smart Connect app or the Smart Connections Obsidian plugin at a time until the embeddings issue gets sorted out.

While they both are able to make the embeddings, there isn't the same "offloading" integration as there was before, which could cause interference if both softwares are attempting to embed at the same time.

The "offloading" integration (improving Obsidian performance by offloading heavy processes to Smart Connect app) will be reintroduced shortly, but for now, since you're having issues with the embedding, it's probably worth trying just one of those softwares at a time. Lastly, when quitting the Smart Connect app, make sure to do it from the task tray (typically bottom right, near volume setting on windows) to ensure it is completely turned off 🌴

I have tried both ways, and it appears to be the same issue each time now. Ever since the naming changed in the embeddings (and whatever else was updated) I cannot make/open embeddings anymore, it seems to make them fine but will refuse to read them.

Here's a video of the process from starting embeddings to trying to open/read them (normal use-case) in Smart Connections.

Whether I make them in Obsidian/App, results are similar.

https://www.dropbox.com/scl/fi/0d3teuzs0rsbb2uzeev3q/ErrorsReading.mp4?rlkey=p8vy3dgc1pwlo14e8jh3s5rrd&dl=0

@bbecausereasonss
Copy link
Author

The error is ...

image

I have verified the Embeddings are now getting created (in the folder), but will not read...

image

@bbecausereasonss bbecausereasonss changed the title Error (making smart connections) with OpenAi Embeddings. Error reading (making smart connections) with Open Ai Embeddings. Sep 2, 2024
@bbecausereasonss
Copy link
Author

Not sure if this is related, but the plugin will not allow me to access (model settings) now. It's all blank, and nothing is populating. Not sure if the behavior is if embeddings can't load/aren't read; then you can't change model options? Anyway, just thought I'd mention that as well.

@bbecausereasonss
Copy link
Author

bbecausereasonss commented Sep 2, 2024

Seems to be blocks related... Appears to me like it's creating embeddings for notes but not blocks; then cannot read them because (null). I've tried only changing the blocks model to a local one, even making it CPU only; same issue.

@algieg
Copy link

algieg commented Sep 2, 2024

In the end I followed a recommendation from some other issue and reverted to 2.1.95 and everything works fine. I'll try updating at some later point in time to check if it's been fixed.

@bbecausereasonss
Copy link
Author

In the end I followed a recommendation from some other issue and reverted to 2.1.95 and everything works fine. I'll try updating at some later point in time to check if it's been fixed.

OMG you're right that fixed the issues and its working. So clearly what ever changes were made after this version broke reading/creating embeddings. Going to stick with this one for now... Thank you!

@brianpetro
Copy link
Owner

@bbecausereasonss thanks for the video. That will help me better try to reproduce the issue.

And I'm happy to see you've got things working again in the meantime 😊🌴

@bbecausereasonss
Copy link
Author

bbecausereasonss commented Sep 2, 2024

Wait nope. Spoke too soon. After trying to make embeddings on a new note I created and restarting, it now won't load any of the embeddings (but does show the number).

image

@brianpetro
Copy link
Owner

@bbecausereasonss have you tried deleting the entire .smart-env folder with the embeddings?

The only times I've encountered the "blocks" error you keep seeing is with some corrupted data in the embedding files. And it's possible the force refresh didn't clear out all the data since it doesn't actually delete the files 🌴

@bbecausereasonss
Copy link
Author

bbecausereasonss commented Sep 2, 2024

@bbecausereasonss have you tried deleting the entire .smart-env folder with the embeddings?

The only times I've encountered the "blocks" error you keep seeing is with some corrupted data in the embedding files. And it's possible the force refresh didn't clear out all the data since it doesn't actually delete the files 🌴

Yep, must have done it like 10x already between today and yesterday :)
Going to try again...

@bbecausereasonss
Copy link
Author

Honestly, I really don't think the app should automatically create embeddings, I think it needs to be a manual process; because I feel like when you upgrade/install and re-install it just creates errors by defaulting to the local model etc. Could be wrong.

@bbecausereasonss
Copy link
Author

image

@bbecausereasonss
Copy link
Author

What seems strange is that all of the errors,issues are quite random. I'm following the same steps but getting different issues at different points seemingly at random. One moment it works, the next it doesn't.

@brianpetro
Copy link
Owner

That last set of errors seems to be from an old version (no more ApiAdapter in latest version).

And I agree that a manual start should be added if the vault contains greater than a threshold of notes. But for most people with <1000 notes I think it tends to best be done automatically.

I've been trying all different combinations of settings and ways to try to trigger the issues, on both mac and windows, and I just can't seem to reproduce.

Is it possible that there is some external syncing process that might be interfering with the files?

🌴

@bbecausereasonss
Copy link
Author

bbecausereasonss commented Sep 2, 2024

That last set of errors seems to be from an old version (no more ApiAdapter in latest version).

And I agree that a manual start should be added if the vault contains greater than a threshold of notes. But for most people with <1000 notes I think it tends to best be done automatically.

I've been trying all different combinations of settings and ways to try to trigger the issues, on both mac and windows, and I just can't seem to reproduce.

Is it possible that there is some external syncing process that might be interfering with the files?

🌴

My main vault has always been in Dropbox. I also use Syncthings to Sync it to a different folder on my OSX/MBP, so that there aren't issues like I was experiencing before. I have just tried disabling Dropbox to see if it was causing issues. Last 2 days I have only been trying to use the main vault on my PC/Dropbox.

@bbecausereasonss
Copy link
Author

This is with the version rolled back to 2.1.9.5
Dropbox turned off
Embeddings folder nuked.
It tried to Create-embeddings
I am trying to use Small OpenAi for both notes/blocks

Then threw these error during creating blocks (I presume):

image

image

@brianpetro
Copy link
Owner

Since it seems to be a problem with the roll backed version too, I would focus on using the latest branch.

Another thing that has worked in the past with similarly difficult to debug issues is creating a small vault where you are able to reproduce the issue reliably. Then you can send me a link to that vault and I can test it out 🌴

@bbecausereasonss
Copy link
Author

Hmm the odd thing is that the contents of my vault have not changed before/after the issues arose, but yes good idea on trying with a smaller vault.

@bbecausereasonss
Copy link
Author

bbecausereasonss commented Sep 2, 2024

Okay so, after restarting the latest time even after above errors the vault embeddings/blocks have loaded and is letting me run inference on 2.1.9.5

BUT only because I switched the (blocks) model to the 512 dimensional variant of OpenAi Small. Does not work at all with the higher dimension one.

I have also been unable to use any (even the small) versions of the local models.

@brianpetro
Copy link
Owner

@bbecausereasonss in v2.2.66 I updated the logic for how the blocks getter (what was erroring in many of the past screenshots) works.

While it doesn't address whatever the root issue is, preventing a failure at that point may improve the overall results 🌴

@bbecausereasonss
Copy link
Author

@bbecausereasonss in v2.2.66 I updated the logic for how the blocks getter (what was erroring in many of the past screenshots) works.

While it doesn't address whatever the root issue is, preventing a failure at that point may improve the overall results 🌴

I'm scared to try it again because it was just freezing completely last 2 days. Maybe I'll try again again later :)

@brianpetro
Copy link
Owner

Ok, or try with a small test vault 🌴

@bbecausereasonss
Copy link
Author

bbecausereasonss commented Sep 3, 2024

Turning on Obsidian, next day. Nothing changed. Same issue. Until I nuked 300 notes or so from a specific Encyclopedia folder (now its loading).

Is there a embedding/vault limit of sorts or maybe a point at which it's too big?

I guess one way to mitigate this is to exclude that folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants