Repository navigation
models: an empty models--* husk no longer hides a plain model store - #143
Merged
Merged
Conversation
A root was read as a HuggingFace cache as soon as one directory was named models--*, so an abandoned, empty download in an LM Studio store made all 43 models beside it disappear. A root is an HF cache only when a models--* directory holds snapshots/, which is what the HF scan reads.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #138, reported by @azrael-229.
Problem
sourceOf()read a model root as a HuggingFace cache as soon as one directory was namedmodels--*. A Windows LM Studio store with 43 models and one emptymodels--...husk, left by an abandoned download, listed 0 models.Change
A root is an HF cache only when a
models--*directory holdssnapshots/, which is whatscanHFCachereads. A store whose onlymodels--*entries are empty is scanned as a plain directory. The Ollama check and both scans are unchanged.Proof
TestScanHFHusk(table, throughScan): a husk beside a plain store, a real cache, and a real cache with a husk beside it.scan =(no models), the reported symptom. With it, all three pass.go test ./..., Windows build and vet, golangci-lint (0 issues).Out of scope: one root that mixes an HF cache with plain model folders still scans as an HF cache, as before.