Skip to content

feat(repr): expose exact backend model revisions#83

Merged
jsugg merged 1 commit into
mainfrom
feat/backend-model-revision
Jul 15, 2026
Merged

feat(repr): expose exact backend model revisions#83
jsugg merged 1 commit into
mainfrom
feat/backend-model-revision

Conversation

@jsugg

@jsugg jsugg commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Makes it possible to record which encoder weights produced a training run,
instead of trusting a mutable tag like main to mean the same thing later.

What changes

  • Every feature backend gains a model_revision property returning the exact
    commit resolved by the loaded model (config._commit_hash).
  • Model identifiers accept a repository@revision form; the revision is passed
    through to the loader so a pinned revision is what actually gets fetched.
  • emotion2vec's local FunASR path has no hub commit to report, so it falls back
    to a content-sha256: digest computed over the model directory. A local
    directory with no revision at all returns None rather than inventing one.

Scope

Additive only — the property is new, and an identifier without @ behaves
exactly as before. No caller reads model_revision yet; the training readiness
work consumes it to bind prepared plans to a verified backend commit, and is
what motivated this.

Verification

make lint, make type (mypy + pyright clean) and the 231 backend/repr tests
pass. Pre-push gate passed.

Backends now report the exact commit they resolved through a model_revision
property, and accept a `repository@revision` model identifier to pin one. The
local emotion2vec path has no hub commit to report, so it falls back to a
content SHA-256 over the model directory.

This is what lets a training run record which encoder weights produced it,
rather than trusting a mutable tag.
@jsugg
jsugg force-pushed the feat/backend-model-revision branch from 7172d58 to e194825 Compare July 15, 2026 21:10
@jsugg
jsugg merged commit 4ac53d3 into main Jul 15, 2026
12 checks passed
@jsugg
jsugg deleted the feat/backend-model-revision branch July 15, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant