denselinkage.core.ports.Trainer

class denselinkage.core.ports.Trainer(*args, **kwargs)[source]

Bases: Protocol[ComponentT]

Produces a frozen component from supervised data (v2, [train]).

train is a factory, not a fit: it returns a NEW component and mutates neither self nor base. base is the optional checkpoint to continue from (enables the recursive blocker -> mine -> retrain loop). The protocol is locked here in Phase A; concrete trainers (EmbedderTrainer -> Embedder, CrossEncoderTrainer -> Matcher) ship in v2 behind the [train] extra.