Module neuralops.trainer.trainer_factory

Functions

def get_trainer(key: str = 'hf') ‑> Any
Expand source code
def get_trainer(key: str = "hf") -> Any:
    """Return a trainer class (not instance)."""
    trainer_cls = TRAINER_FACTORY_REGISTRY.get(key)
    if trainer_cls is None:
        return HuggingFaceTrainer  # default fallback
    return trainer_cls

Return a trainer class (not instance).