Skip to content

Plugin interfaces

kd.search holds the machinery behind the algorithm plugins; this page lists the part a plugin author implements. SurrogateTrainer is the protocol an algorithm whose descriptor names config_artifact_keys must satisfy, a train_surrogate method and an artifacts mapping; a registry-level test enforces the pairing for every registered algorithm.

The name is imported from the subpackage rather than the package root: from kd.search import SurrogateTrainer.

SurrogateTrainer

Bases: Protocol

Plugin face for training the derivative surrogate as a standalone action.

artifacts property

artifacts: dict[str, dict[str, str | int]] | None

Identity of the injected surrogate keyed by its config key; None when nothing was injected.

train_surrogate

train_surrogate(
    dataset: PDEDataset,
) -> tuple[Module, TrainingResult]

Train and return (module, training_result) without installing it.