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

Address error on /learn after change of embedding model #870

Merged
merged 4 commits into from
Jul 8, 2024

Conversation

srdas
Copy link
Collaborator

@srdas srdas commented Jul 3, 2024

Fixes Issue #869

The all_files parameter was not being passed to learn the RAG folder when the embedding provider is changed. This has now been fixed and tested. To test, an initial embedding model is used and /learn is applied.
image

(See Issue #869 for the error that is addressed below.)

Next, the embedding model is changed on the settings page and /learn is tested again to make sure it is working as expected, as shown:
image

@srdas srdas added the bug Something isn't working label Jul 3, 2024
Copy link
Collaborator

@3coins 3coins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@srdas
Thanks for fixing this. It might be better to make the default in learn_dir as False, which is the most used option. Also, it seems like that relearn which indexes the files in case the embedding model is changed, should save the all_files option initially passed from the user.

For an immediate fix, let's make all_files default as False, long term let's figure out how to persist the all_files option passed by the user, so that relearn works in the intended way when model is changed.

@srdas
Copy link
Collaborator Author

srdas commented Jul 5, 2024

@srdas Thanks for fixing this. It might be better to make the default in learn_dir as False, which is the most used option. Also, it seems like that relearn which indexes the files in case the embedding model is changed, should save the all_files option initially passed from the user.

For an immediate fix, let's make all_files default as False, long term let's figure out how to persist the all_files option passed by the user, so that relearn works in the intended way when model is changed.

@3coins As suggested, the default in learn_dir is now set to False. This takes care of the bug. Will work on the remaining part of the suggestion.

Copy link
Collaborator

@3coins 3coins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, should be ok to merge after the rebase.

@srdas srdas merged commit 4664a0b into jupyterlab:main Jul 8, 2024
8 checks passed
@krassowski krassowski mentioned this pull request Jul 11, 2024
Marchlak pushed a commit to Marchlak/jupyter-ai that referenced this pull request Oct 28, 2024
…#870)

* Address error on `/learn` after change of embedding model.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Set `all_files` option to default to False

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants