.pt2 checkpoint. Models with custom forward logic (M-Optimus, tissue segmentation) use a dedicated subclass; all others load as a plain BaseServerModel with the spec resolved from the SDK YAML configs.
This factory is the single source of truth for the model registry, shared by the FastAPI server (api) and the SDK in-process backend (InProcessClient).
custom_model_classes
build_server_model
Registry key (e.g.
"h1", "m-optimus", "tissue-seg").Path to the
.pt2 checkpoint file. Its parent directory is used as the model root and its filename as the checkpoint name.Torch device string (
"cuda", "cuda:0", "cpu").Directory containing gene-set CSVs for M-Optimus. Ignored by models that do not require assets. Defaults to the baked-in container path when omitted.
BaseServerModel (or subclass).
Raises:
FileNotFoundError- If the checkpoint file does not exist.KeyError- If the model has no custom handler and no SDK config.

