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

Incremental refresh #23

Open
louis030195 opened this issue Dec 9, 2022 · 3 comments
Open

Incremental refresh #23

louis030195 opened this issue Dec 9, 2022 · 3 comments
Labels
enhancement New feature or request make recipe Make recipe, rather than implement in API

Comments

@louis030195
Copy link

Hey, for https://github.com/louis030195/obsidian-ava, I'm trying to implement increment refresh of the state of the vault.

Concretely, I build sentence embeddings of the whole vault and would like to re-compute embeddings every time a note is updated/deleted/created.

Do you see any way of doing this incrementally rather than reloading the vault and recomputing everything every time? (It takes ~1 min on mps device on my 500k words vault)

Ideally, I'd see maybe an API that let me listen to vault changes with callback(s) in this library?

Thanks 🚀😃

@mfarragher
Copy link
Owner

mfarragher commented Dec 9, 2022

These are a few API changes that I think can enable this:

  • Let class properties have setters
  • Allow gather() to be called without connect()

I can see how incremental refresh would be useful for NLP analytics. With that there would only be the dictionaries of text to be updated. Incremental refresh to update info populated via connect() seems complex in contrast.

When looking at libraries that monitor file changes in a directory, there are a few out there, but they don't seem to be cross-platform. They seem Linux-focused. I won't add functionality for this in obsidiantools via a new method or class, but think it'll be interesting to see what recipes can be made for this.

@mfarragher mfarragher added make recipe Make recipe, rather than implement in API and removed help wanted Extra attention is needed labels Dec 11, 2022
@mfarragher
Copy link
Owner

So far I've added this to the code: 5b73e6f

I have also been prototyping some code to listen to file changes with another library. More work is needed to play around with async for the attr updates.

@mfarragher
Copy link
Owner

More attr setters are available since this commit: 6880842

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request make recipe Make recipe, rather than implement in API
Projects
None yet
Development

No branches or pull requests

2 participants