-
Notifications
You must be signed in to change notification settings - Fork 22
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
feat: allow to import local models #771
Conversation
Nice! |
6e4bc2f
to
869ee6e
Compare
There is an issue when you delete a model having an inference server using it and you stop/start ai lab again. Fixing it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice feature ! I added some comment
}); | ||
} | ||
|
||
const customCatalog = path.resolve(this.appUserDirectory, 'catalog.json'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should have two catalog here. I am not in favor of overwriting the native catalog, I feel it would be more appropriate to have some kind of user-models.json
in the appUserDirectory
what do you think ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my point of view the operation that the user is doing here it is just updating the custom catalog.json file that we already support. It is just that we guide them. But if someone wants to add a new model manually we are already saying that they need to create a catalog.json
file (copy/paste the assets/ai.json
) inside the ai-lab folder and update it.
So i wouldn't create a new file as it may overcomplicate stuff, but let's see what others think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do you handle the case where we update on our side the catalog ? Are we losing the user imported models ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When importing, if the catalog.json
file already exists, it just adds the new models in there and update the file on disk. If it does not exists it creates it on disk by copying the content from the native ai.json
and adding the imported models.
So if the user wants to update the catalog after having imported models he would work as before. Open the catalog.json
file which would also contain the imported models and edit it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if some day we want to remove a model ? like we did with llama2 ? the mechanism you describe would not be suitable ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the same thing that may happen today. If i create my custom catalog.json and we update ai.json, ai-lab will still point to the custom catalog. We have to refactor how the custom catalog + ai.json work or inform the user any update. Opening an issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-> #792
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okey good to have follow up issue thanks !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about having the 2 files but merging them instead of choosing one over the other
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost looking good just some stuff I find out while testing it
Breadcrumb
Could we have the breadcrumb allowing to go back to models page ?
Import timeout
Taking very long time to select a file in explorer gave a timeout
We probably need to find out some kind of way to get back this value and update the form. (This could be skipped, but would need to be address at some point)
Selected file
Maybe I should not be able to select files inside the models folder ?
If I import a model from the AI-Studio, it gets weird
Nice catches!!
Done
I'll give a look on desktop side as the timeout is really tight. For the moment i added an error message if something unexpected happen so the user is informed.
Added a check to verify that the selected model is not already in the catalog. |
The size information is missing and I'm wondering how the RAM usage is computed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The timeout issue is to be fixed because it breaks the user experience
The RAM usage is = size of the file as it seems to me that that is the value we use in the catalog, no? |
@jeffmaury timeout removed and size + creation date added |
No, the ram usage does not come from the file size. For the models in the catalog, it is computed with the script in |
Ah I completely missed that part. Thanks for telling me. Removed the memory property for the moment then. 👍 |
I would rather default the memory field to the file size |
I think this is misleading and does not reflect reality |
If we don't have the information about the resource constraints of a model, I wouldn't guess it. Maybe we can display |
Both are in the same order of magnitude (file size is a little bit bigger) and as we will check the machine size based on this data, I would rather ask a little bit of additional memory than risking failures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ! 🚀 thanks you for your patience and the fixes, great job!
Signed-off-by: lstocchi <lstocchi@redhat.com>
Signed-off-by: lstocchi <lstocchi@redhat.com>
… on the catalog Signed-off-by: lstocchi <lstocchi@redhat.com>
… it when modelManager is disposed Signed-off-by: lstocchi <lstocchi@redhat.com>
…something unexpected happen when adding a new model and fix css inputs Signed-off-by: lstocchi <lstocchi@redhat.com>
…nels Signed-off-by: lstocchi <lstocchi@redhat.com>
Signed-off-by: lstocchi <lstocchi@redhat.com>
Signed-off-by: lstocchi <lstocchi@redhat.com>
Co-authored-by: axel7083 <42176370+axel7083@users.noreply.github.com> Signed-off-by: Luca Stocchi <49404737+lstocchi@users.noreply.github.com>
Co-authored-by: axel7083 <42176370+axel7083@users.noreply.github.com> Signed-off-by: Luca Stocchi <49404737+lstocchi@users.noreply.github.com>
Co-authored-by: axel7083 <42176370+axel7083@users.noreply.github.com> Signed-off-by: Luca Stocchi <49404737+lstocchi@users.noreply.github.com>
Signed-off-by: lstocchi <lstocchi@redhat.com>
Signed-off-by: lstocchi <lstocchi@redhat.com>
Signed-off-by: lstocchi <lstocchi@redhat.com>
@jeffmaury set the memory value equals to the file size as you said. Let me know if there is something else to change. |
Signed-off-by: lstocchi <lstocchi@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What does this PR do?
It allows to import .gguf models that have already been downloaded by the user and that are on his machine.
After imported, the user can start a service, open its folder and delete it
Screenshot / video of UI
What issues does this PR fix or reference?
it resolves #173
Fixes #814
How to test this PR?