personalitylinmult.inference.register_models¶
Register the trained FI models into the MLflow Model Registry.
Reads the best checkpoint each training run logged (under its model/ artifact
path), wraps it as a pyfunc model, and registers it under a stable name so it
can be served or containerised. Run after training; idempotent in the sense that
re-running adds a new version rather than clobbering the old one.
Example
Register the three audio models (LinMulT fusion + two LinT unimodal arms):
uv run python -m personalitylinmult.inference.register_models
Attributes¶
Module-level logger. |
|
Where the training runs were logged. |
|
LinMulT fusion (wavlm+emotion2vec) plus the two LinT |
Classes¶
One model to register. |
Functions¶
|
Register every configured model, returning |
|
CLI entry point. |
Module Contents¶
- personalitylinmult.inference.register_models.logger¶
Module-level logger.
- personalitylinmult.inference.register_models.DEFAULT_TRACKING_URI = 'sqlite:///mlflow.db'¶
Where the training runs were logged.
- class personalitylinmult.inference.register_models.Registration[source]¶
One model to register.
- Parameters:
experiment (str) – MLflow experiment holding the trained run.
registered_name (str) – Name to register under, e.g.
fi_linmult_wavlm-emotion2vec.run_id (str | None) – Exact run to register.
Nonefalls back to the experiment’s most recently started run – convenient while iterating, but not a deliberate choice of “the best run”, so a promotion decision should pin this explicitly (seeset_champion()for the separate, deliberate promotion step).
- personalitylinmult.inference.register_models.REGISTRATIONS: list[Registration]¶
LinMulT fusion (wavlm+emotion2vec) plus the two LinT unimodal arms (wavlm only, emotion2vec only).
- Type:
The audio models
- personalitylinmult.inference.register_models.register_all(registrations: list[Registration] | None = None, tracking_uri: str = DEFAULT_TRACKING_URI) dict[str, str][source]¶
Register every configured model, returning
{name: version}.- Parameters:
registrations (list[Registration] | None) – Models to register; the module default when
None.tracking_uri (str) – MLflow backend store.
- Returns:
Registered name to version.
- Return type:
dict[str, str]
- personalitylinmult.inference.register_models.main() None[source]¶
CLI entry point.
With no arguments, registers every model in
REGISTRATIONS. Passing--experiment/--registered-nameregisters exactly that one model instead – the deliberate, ad hoc path for a run that is not (yet, or ever) part of the standing registration list.--aliasadditionally promotes the newly registered version, so a single command can both register and mark a version as the champion.