{"record":{"id":"6c38ed7943b19d12","repo":"Lightning-AI/pytorch-lightning","slug":"the-type-self-name-does-not-use-the-chec-6c38ed","errorCode":null,"errorMessage":"The `{type(self).__name__}` does not use the `CheckpointIO` plugin interface.","messagePattern":"The `(.+?)` does not use the `CheckpointIO` plugin interface\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"src/lightning/fabric/strategies/model_parallel.py","lineNumber":126,"sourceCode":"        self._tensor_parallel_size = tensor_parallel_size\n        self._num_nodes = 1\n        self._save_distributed_checkpoint = save_distributed_checkpoint\n        self._process_group_backend: Optional[str] = process_group_backend\n        self._timeout: Optional[timedelta] = timeout\n        self._backward_sync_control = _ParallelBackwardSyncControl()\n\n        self._device_mesh: Optional[DeviceMesh] = None\n\n    @property\n    def device_mesh(self) -> \"DeviceMesh\":\n        if self._device_mesh is None:\n            raise RuntimeError(\"Accessing the device mesh before processes have initialized is not allowed.\")\n        return self._device_mesh\n\n    @property\n    @override\n    def checkpoint_io(self) -> CheckpointIO:\n        raise NotImplementedError(f\"The `{type(self).__name__}` does not use the `CheckpointIO` plugin interface.\")\n\n    @checkpoint_io.setter\n    @override\n    def checkpoint_io(self, io: CheckpointIO) -> None:\n        raise NotImplementedError(f\"The `{type(self).__name__}` does not support setting a `CheckpointIO` plugin.\")\n\n    @property\n    @override\n    def root_device(self) -> torch.device:\n        assert self.parallel_devices is not None\n        return self.parallel_devices[self.local_rank]\n\n    @property\n    def num_nodes(self) -> int:\n        return self._num_nodes\n\n    @num_nodes.setter\n    def num_nodes(self, num_nodes: int) -> None:","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/Lightning-AI/pytorch-lightning/blob/9fed5c27d2a62ff0efd6c3573599921d6ff67c14/src/lightning/fabric/strategies/model_parallel.py#L108-L144","documentation":"ModelParallelStrategy does not use the CheckpointIO plugin interface: both the checkpoint_io getter and setter raise NotImplementedError by design, because checkpointing for this strategy is handled through a different mechanism (state-dict based saving/loading via the strategy itself). Any generic code path that reads or assigns strategy.checkpoint_io will hit this.","triggerScenarios":"Calling strategy.checkpoint_io or assigning strategy.checkpoint_io = ... on ModelParallelStrategy; generic tooling (profiling, checkpoint wrappers, older Lightning abstractions) that unconditionally accesses the property on any Strategy instance.","commonSituations":"Porting code from DDP/FSDP strategies that set a custom CheckpointIO (e.g. fsspec or deepspeed-style IO plugins); shared utilities that iterate strategies and touch checkpoint_io; version upgrades where the base-class contract changed to require the property.","solutions":["Remove any code that sets or reads checkpoint_io when using ModelParallelStrategy; rely on fabric.save/load","For custom storage backends, serialize via the strategy's state_dict hooks instead of a CheckpointIO plugin","If you need a pluggable CheckpointIO, use a strategy that supports it (e.g. DDPStrategy/FSDPStrategy) or subclass and override the property knowingly"],"exampleFix":"# before\nstrategy = ModelParallelStrategy()\nstrategy.checkpoint_io = MyCheckpointIO()  # NotImplementedError\n\n# after\nstrategy = ModelParallelStrategy()\nfabric = Fabric(strategy=strategy)\nfabric.save(\"ckpt.path\", state)  # state-dict based, no CheckpointIO plugin","handlingStrategy":"type-guard","validationCode":"from lightning.fabric.strategies import ModelParallelStrategy\nuses_checkpoint_io = not isinstance(strategy, ModelParallelStrategy)\nif uses_checkpoint_io:\n    strategy.checkpoint_io = my_io","typeGuard":"def supports_checkpoint_io(strategy) -> bool:\n    try:\n        _ = strategy.checkpoint_io\n        return True\n    except NotImplementedError:\n        return False","tryCatchPattern":"try:\n    strategy.checkpoint_io = io\nexcept NotImplementedError:\n    pass  # strategy handles checkpointing via state_dict path","preventionTips":["Feature-detect plugin interfaces instead of assuming every Strategy supports them","Use fabric.save/fabric.load for ModelParallelStrategy checkpoints"],"tags":["pytorch-lightning","model-parallel","checkpoint-io","not-implemented","api-contract"],"backgroundTag":"unsupported-plugin-interface-access","analyzedSha":"9fed5c27d2a62ff0efd6c3573599921d6ff67c14","analyzedAt":"2026-08-28T11:52:41.083Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}