fedora-copr / logdetective

Analyze logs using Language Model (LLM) and Drain template miner.
Apache License 2.0
5 stars 8 forks source link

Download models using HF hub API #32

Closed jpodivin closed 2 months ago

jpodivin commented 2 months ago

Adds dependency on huggingface_hub. Removes builtin download function. Simplifies model initialization. Additional comments provided to improve code literacy. Cache management now handled by huggingface_hub. Removed dependency on progressbar2.

jpodivin commented 2 months ago

I love the code simplification. Worked locally just fine even though I had to download the model, again, since huggingface hub fetches the bare git repo.

One thing we should discuss at some point is about the relation of the CLI and server parts: can they share some internals? meaning, none of these changes affect the server part.

LGTM, well done

Thanks. I would actually prefer to package models with the image directly, instead of downloading them during startup. It would be easier to ensure the right model is used and remove potential security hazard. We can include hash checks in the layer as well, to make sure we are getting what we asked for.