Skip to main content

Module registry

Module registry 

Source
Expand description

Step 4: the registry — version the spec, its metrics, and the growth log so an ontology is reproducible and auditable (design.py: “version the model + facet spec + metrics in a filesystem registry (models/<id>/, registry.json)”).

Layout:

  <root>/registry.json          index: every version, newest first
  <root>/<id>/spec.json         the VocabularySpace at that version
  <root>/<id>/metrics.json      MECE report + growth decisions

Ids are v<N>-<corpus-slug> so they sort readably and say what they describe. The index is rewritten atomically (temp + rename) because it is the one file two runs could race on.

Structs§

Registry
Version

Constants§

INDEX_FILE

Functions§

load_spec
Load a registered spec by id (or the newest when id is None).
register
Register a spec version: writes <root>/<id>/{spec.json,metrics.json} and prepends the index entry. metrics is free-form (MECE report, growth log, training numbers) and stored verbatim.