Documentation
¶
Index ¶
Constants ¶
const ( DirName = "cache" DatabaseFile = "model-metadata.db" )
const DerivationVersion = 2
DerivationVersion invalidates cached derivations when the logic that computes them changes rather than when the model files change. Fingerprint hashes file identity only, so an untouched model directory would otherwise keep a pipeline tag derived by an older build: a text-to-speech model cached as "text-generation" before DetectPipelineTag learned to recognise codec-token TTS models would stay misclassified after an upgrade. Bump this whenever DetectPipelineTag or any other cached derivation changes.
Variables ¶
This section is empty.
Functions ¶
func Fingerprint ¶
Fingerprint hashes file identity metadata without reading model contents. Any add, remove, resize, or modification invalidates the cached derivations, as does a DerivationVersion bump.