mirror of
https://github.com/immich-app/immich.git
synced 2025-12-17 09:13:17 +03:00
fix(ml): minScore not being set correctly (#3916)
* fixed `minScore` not being set correctly * apply to init * don't send `enabled` * fix eslint warning * better error message
This commit is contained in:
@@ -22,7 +22,7 @@ class ImageClassifier(InferenceModel):
|
||||
cache_dir: Path | str | None = None,
|
||||
**model_kwargs: Any,
|
||||
) -> None:
|
||||
self.min_score = min_score
|
||||
self.min_score = model_kwargs.pop("minScore", min_score)
|
||||
super().__init__(model_name, cache_dir, **model_kwargs)
|
||||
|
||||
def _download(self, **model_kwargs: Any) -> None:
|
||||
@@ -65,4 +65,4 @@ class ImageClassifier(InferenceModel):
|
||||
return tags
|
||||
|
||||
def configure(self, **model_kwargs: Any) -> None:
|
||||
self.min_score = model_kwargs.get("min_score", self.min_score)
|
||||
self.min_score = model_kwargs.pop("minScore", self.min_score)
|
||||
|
||||
Reference in New Issue
Block a user