Refinement of PretrainedModelProtocol for the family's
direct (backbone) model — the class whose name does not
contain For<Task> (e.g. ResNet, BERTModel, ViT,
DDPMModel).
Currently identical in shape to the base protocol; the dedicated
type exists so static checkers can distinguish backbones from
task wrappers at call sites that demand one or the other. A
feature-extraction utility, for example, should require a
backbone — not an ImageClassification head — to avoid
accidentally pulling logits.
Notes
Naming rule: any public class in _model.py whose name lacks
the For<CapWord> pattern is treated as the backbone. See
arch-models-family-contract slot 2.
Examples
>>> from lucid.models.vision.resnet import ResNet
>>> from lucid.models._protocols import BackboneProtocol, TaskWrapperProtocol
>>> isinstance(ResNet, BackboneProtocol)
True
>>> isinstance(ResNet, TaskWrapperProtocol)
True # all backbones structurally satisfy the wrapper protocol too;
# nominal naming is what distinguishes them