Model factory¶
models
¶
Model factory.
Importing this package registers every model file by name (each model module ends with
register(...)); get_model(name) returns the class and list_models() lists the
registered names. Adding a model is one new file + one register call listed below — no
other edits.
The model modules are imported here for their registration side effect. The import block grows by one line per model.
base_model_name
¶
Return the canonical registered base model name from a <base>@<tag> variant string.
filter_available_models
¶
Filter models to those whose upstream package is installed in this environment.
Logs a warning for each omitted model so restricted environments can run a broad model list without failing on uninstalled optional packages.
Source code in src/scale_forecasting/models/__init__.py
get_model
¶
Return the registered model class for name (or <base>@<tag> variant).
Raises ModelError with the available names when name is unknown.
Source code in src/scale_forecasting/models/__init__.py
list_models
¶
All registered model names, sorted.
Pass available_only=True to restrict the returned list to models whose
upstream Python package is installed in the current environment.