Module neuralops.trainer.base_trainer

Classes

class BaseTrainer
Expand source code
class BaseTrainer(ABC):
    """Abstract base class for all trainers."""

    @abstractmethod
    def train(self) -> dict[str, Any]:
        """Fit the model on the provided dataset."""
        pass

    @abstractmethod
    def evaluate(self) -> dict[str, Any]:
        """Run evaluate and return results."""
        pass

Abstract base class for all trainers.

Ancestors

  • abc.ABC

Subclasses

Methods

def evaluate(self) ‑> dict[str, typing.Any]
Expand source code
@abstractmethod
def evaluate(self) -> dict[str, Any]:
    """Run evaluate and return results."""
    pass

Run evaluate and return results.

def train(self) ‑> dict[str, typing.Any]
Expand source code
@abstractmethod
def train(self) -> dict[str, Any]:
    """Fit the model on the provided dataset."""
    pass

Fit the model on the provided dataset.