xnn.common.models.registry#
Name -> class registry so new models are added without touching the core.
For example:
from xnn.common.models.registry import register_model, build_model
@register_model("mymodel")
class MyModel(InteratomicPotential):
@classmethod
def from_config(cls, cfg): ...
A model becomes usable from any config (YAML/Hydra/argparse) the moment it is imported and registered. This is the extension point referenced in the README.
Functions
|
Wrap |
List the names of all currently registered models. |
|
|
Instantiate a registered model from a configuration dataclass. |
|
Return a class decorator that registers a model under |