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

Smart Connections freezing and re-embedding frequently #583

Open
MorganOnCode opened this issue May 5, 2024 · 11 comments
Open

Smart Connections freezing and re-embedding frequently #583

MorganOnCode opened this issue May 5, 2024 · 11 comments

Comments

@MorganOnCode
Copy link

My Smart Connections instance has become unusable.
Every time I try to use it, it either freezes or forces re-embedding, which then freezes my whole Obsidian app.

Smart Connections used to be so good! It seems the latest updates have killed it for my machine.
I'm on a Macbook Pro M2 Ultra chipset.

When using chat, it fails frequently without any error warning - just doesn't function.
Single line prompts in the chat sometimes work, but often don't.
When I type a line break, it seems to fail more often.

I'd like to understand if I'm doing anything wrong?

These are my settings (it's presently frozen on this screen)

Screenshot 2024-05-05 at 10 42 12
@AdalaceV2
Copy link

AdalaceV2 commented May 6, 2024

I seem to also be suffering from this same issue. Also on an M2.

@brianpetro
Copy link
Owner

Hi @AdalaceV2 & @MorganOnCode

Thanks for letting me know about this.

While the computer hardware running Obsidian may be overall sufficient, the underlying software Obsidian uses (electron) arbitrarily limits memory usage. That's why running almost any model within Obsidian tends to grind things to a halt.

You can improve this immediately by getting the Smart Connect software. Smart Connect uses the same internals to offload the embedding processing from the Obsidian app. To do this, install and open Smart Connect, then click "Connect to Smart Connect," as seen in the screenshot above, to begin using it for your embeddings.

Every time I try to use it, it either freezes or forces re-embedding, which then freezes my whole Obsidian app.

See #578 (comment) for a couple important notes for preventing re-embedding.

Smart Connections used to be so good! It seems the latest updates have killed it for my machine.

This is most likely due to the introduction of local embeddings. If you switch back to OpenAI embeddings, performance should be equivalent to v1.x.x while still having the many new and improved features added since v1.

When using chat, it fails frequently without any error warning - just doesn't function.

Is this during the embedding processing?

Single line prompts in the chat sometimes work, but often don't.

Can you send me a screenshot of the developer console logs when this happens so I can take a look?

When I type a line break, it seems to fail more often.

Is this in reference to the chat input? Or on a note during the embedding processing? Considering the above, it would make sense if it is the latter since a new line in a note will cause re-rendering, which could cause the application to exceed that arbitrary memory limit.

Thanks for your help in getting to the bottom of these issues
🌴

@AdalaceV2
Copy link

How can I grab some logs of the error? I'm pretty sure I can reproduce the problem on my end.

@brianpetro
Copy link
Owner

Hey @AdalaceV2

Make sure you update to the latest version, just made a few bugfixes now available in 2.1.57.

Then open the dev console using View > Toggle Developer Tools to see the logs.

Thanks for your help
🌴

@AdalaceV2
Copy link

Ok I've narrowed it down.

It is triggered whenever I try to access the search (through the magnifier icon) after moving a file to a different folder.

The program goes into an infinite loop of this message:
image

This happens here:
image

Because of this error:
image

@MorganOnCode
Copy link
Author

image

This doesn't seem that useful to me.
I uninstalled Smart Connections for a bit because it was making Obsidian unusable.
I've reinstalled to try to fix.

@brianpetro - How can I help navigate the dev console and give you useful data?

@MorganOnCode
Copy link
Author

Hey @brianpetro,

image

See #578 (comment) for a couple important notes for preventing re-embedding.

I've selected the "Embedding file per note (EXPERIMENTAL)" setting and it seemed to give me these red errors in the console.
I also set all the models to OpenAI in input a fresh API key (which was validated and works).
Sadly, Obsidian immediately crashed and I've had to force quit it again.

Is this in reference to the chat input? Or on a note during the embedding processing? Considering the above, it would make sense if it is the latter since a new line in a note will cause re-rendering, which could cause the application to exceed that arbitrary memory limit.

Yes, when I was able to chat with it, a single line input would get a response, but a multi line (with a line break return) input would get no response.

When I get it working again, I'll paste the logs

I'd love for Smart Connections to work again

@MorganOnCode
Copy link
Author

MorganOnCode commented May 8, 2024

@brianpetro - I got SC setup, the API key is entered and it seemed to finish embedding. But:

image

When I ask it basic questions, it says it doesn't have access to my notes.

image

Apologies, I don't know what is useful to you from the dev console - if there's a way to export the logs - I will send them to you in a better format

@brianpetro
Copy link
Owner

Hey @MorganOnCode

Thanks for the screenshots! While they may look like gibberish, they do help.

If you don't mind, turning on the "debug at startup time" in the community settings tab will make the logs more helpful (it gives me accurate file names and line numbers for inspecting the code).

Based on the logs, I can see that it looks up your notes. However, it seems that the lookup is failing to return any results.

This is likely because either the embeddings don't exist or the embeddings failed to load.

One way to confirm this is to see if the Smart View is working. If the Smart View is not working, then the lookup in the chat won't work either.

Thanks for your help and patience while we figure this one out
🌴

@bbecausereasonss
Copy link

bbecausereasonss commented May 24, 2024

For the record, since the new releases I'm having the issue of being asked to rebuild embedding every time I switch between PC/OSX again. This stopped happening before after I did the individual embeddings, and synched to a separate folder, but now it's back and Im unsure why.

@brianpetro
Copy link
Owner

Hey @bbecausereasonss

Are you syncing the embeddings folder?

I recommend not syncing the folder. Each device will have to "catch up" with any changes made on the other devices, but this processing time should be negligible unless you make major changes.

Are you on the v2.2 early release?

On v2.2, I've been switching back and forth between OSX and Windows and haven't noticed any unnecessary re-embeddings.

Can you make the issue happen on demand, i.e., by opening on one platform, closing, then opening on the other platform and observing the issue?

Thanks for the update
🌴

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

4 participants