containers / podman-desktop-extension-ai-lab

Work with LLMs on a local environment using containers
https://podman-desktop.io/extensions/ai-lab
Apache License 2.0
182 stars 41 forks source link

chore: changes id of imported model to sha value of models path #2146

Closed gastoner closed 3 days ago

gastoner commented 4 days ago

What does this PR do?

Updates model ID when importing model

What issues does this PR fix or reference?

Closes #1942

How to test this PR?

Steps in the issue (any locally imported model)

gastoner commented 4 days ago

I'll investigate further and try to find a place where would be better place to update the id - to fix the current models

gastoner commented 4 days ago

The hash would be great. On Windows it works without problem because the path does not contain "/" But I would imagine same problem on Mac with the Routes

gastoner commented 4 days ago

ModelInfo have sha256 optional attribute - so during import I would compute sha and store it to the model and use it instead of path inside the id

benoitf commented 4 days ago

it can also be a hash of the id (or the id is becoming a hash of the file (but it would take time to compute as it's large files)

gastoner commented 4 days ago

Do we even want to have the hash IDs in downloaded models? I assume that yes, to be unified

benoitf commented 4 days ago

PTAL @jeffmaury

gastoner commented 3 days ago

@jeffmaury you have to import the model again

gastoner commented 3 days ago

@benoitf It should be affecting only newly imported models