{"record":{"id":"9301338395fb1eea","repo":"Lightning-AI/pytorch-lightning","slug":"the-type-self-name-does-not-use-the-chec","errorCode":null,"errorMessage":"The `{type(self).__name__}` does not use the `CheckpointIO` plugin interface.","messagePattern":"The `(.+?)` does not use the `CheckpointIO` plugin interface\\.","errorType":"validation","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"src/lightning/fabric/strategies/fsdp.py","lineNumber":191,"sourceCode":"\n        # Enables joint setup of model and optimizer, multiple optimizer param groups, and `torch.compile()`\n        self._fsdp_kwargs.setdefault(\"use_orig_params\", True)\n\n        if device_mesh is not None:\n            self._fsdp_kwargs[\"device_mesh\"] = device_mesh\n\n        self._activation_checkpointing_kwargs = _activation_checkpointing_kwargs(\n            activation_checkpointing, activation_checkpointing_policy\n        )\n        self._state_dict_type = state_dict_type\n        self.sharding_strategy = _init_sharding_strategy(sharding_strategy, self._fsdp_kwargs)\n        self.cpu_offload = _init_cpu_offload(cpu_offload)\n        self.mixed_precision = mixed_precision\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":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/Lightning-AI/pytorch-lightning/blob/9fed5c27d2a62ff0efd6c3573599921d6ff67c14/src/lightning/fabric/strategies/fsdp.py#L173-L209","documentation":"FSDPStrategy manages checkpointing itself (via torch.distributed.checkpoint / FSDP state dict APIs) and does not use the CheckpointIO plugin interface. Accessing the checkpoint_io property raises NotImplementedError to signal the API is not applicable.","triggerScenarios":"Reading strategy.checkpoint_io or generic code that assumes every Strategy exposes a CheckpointIO plugin (e.g. shared utilities, older Lightning code) when the strategy is FSDPStrategy.","commonSituations":"Porting code that called strategy.checkpoint_io.save/remove; libraries that introspect strategies; version upgrades where FSDP moved away from CheckpointIO.","solutions":["Use strategy.save_checkpoint / load_checkpoint instead of checkpoint_io methods","Guard with isinstance(strategy, FSDPStrategy) or hasattr checks before touching checkpoint_io","Update shared utilities to use the strategy-level checkpoint API"],"exampleFix":"# before\nstrategy.checkpoint_io.save_checkpoint(checkpoint, path)\n\n# after\nstrategy.save_checkpoint(path, state)","handlingStrategy":"type-guard","validationCode":"from lightning.fabric.strategies import FSDPStrategy\nif not isinstance(strategy, FSDPStrategy):\n    io = strategy.checkpoint_io  # safe only here","typeGuard":"from lightning.fabric.strategies import FSDPStrategy\ndef has_checkpoint_io(strategy) -> bool:\n    return not isinstance(strategy, FSDPStrategy)","tryCatchPattern":"try:\n    strategy.checkpoint_io\nexcept NotImplementedError:\n    pass  # FSDP manages checkpointing natively","preventionTips":["Use strategy.save_checkpoint/load_checkpoint uniformly","Feature-detect instead of assuming the plugin exists"],"tags":["fsdp","checkpoint","not-implemented","api-misuse"],"backgroundTag":"unsupported-api-call","analyzedSha":"9fed5c27d2a62ff0efd6c3573599921d6ff67c14","analyzedAt":"2026-08-28T11:52:41.083Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}