{"record":{"id":"8fe70471d3d2d54c","repo":"Lightning-AI/pytorch-lightning","slug":"not-found-in-registry-available-names-8fe704","errorCode":null,"errorMessage":"'{}' not found in registry. Available names: {}","messagePattern":"'(.+?)' not found in registry\\. Available names: (.+?)","errorType":"exception","errorClass":"KeyError","httpStatus":null,"severity":"error","filePath":"src/lightning/fabric/strategies/registry.py","lineNumber":101,"sourceCode":"\n    @override\n    def get(self, name: str, default: Optional[Any] = None) -> Any:\n        \"\"\"Calls the registered strategy with the required parameters and returns the strategy object.\n\n        Args:\n            name (str): the name that identifies a strategy, e.g. \"deepspeed_stage_3\"\n\n        \"\"\"\n        if name in self:\n            data = self[name]\n            return data[\"strategy\"](**data[\"init_params\"])\n\n        if default is not None:\n            return default\n\n        err_msg = \"'{}' not found in registry. Available names: {}\"\n        available_names = \", \".join(sorted(self.keys())) or \"none\"\n        raise KeyError(err_msg.format(name, available_names))\n\n    def remove(self, name: str) -> None:\n        \"\"\"Removes the registered strategy by name.\"\"\"\n        self.pop(name)\n\n    def available_strategies(self) -> list:\n        \"\"\"Returns a list of registered strategies.\"\"\"\n        return list(self.keys())\n\n    def __str__(self) -> str:\n        return \"Registered Strategies: {}\".format(\", \".join(self.keys()))\n","sourceCodeStart":83,"sourceCodeEnd":113,"githubUrl":"https://github.com/Lightning-AI/pytorch-lightning/blob/9fed5c27d2a62ff0efd6c3573599921d6ff67c14/src/lightning/fabric/strategies/registry.py#L83-L113","documentation":"StrategyRegistry.get raises KeyError when the requested strategy name is not registered (and no default was provided). The message lists the available names to help correct the typo or identify the missing plugin.","triggerScenarios":"Accessing registry['name']/registry.get('name') with a misspelled or unregistered strategy name — e.g. 'deepseed' instead of 'deepspeed', or an XLA/deepspeed strategy when the required dependency isn't installed so its name was never registered.","commonSituations":"Typos in strategy names in config files; strategies whose registration is conditional on optional dependencies (torch_xla, deepspeed) being installed; version changes renaming/removing strategies.","solutions":["Pick a name from the listed available names (the error message enumerates them)","Install the optional dependency that registers the strategy (pip install lightning[xla] / deepspeed)","Fix typos, e.g. 'deepspeed_stage_3' vs 'zero_stage_3'","Register the custom strategy yourself before get()"],"exampleFix":"# before\nstrategy = registry.get('deepseed_stage_3')\n# after\nprint(registry.available_strategies())\nstrategy = registry.get('deepspeed_stage_3')","handlingStrategy":"validation","validationCode":"available = set(registry.available_strategies())\nassert strategy_name in available, f'{strategy_name!r} not in {sorted(available)}'","typeGuard":"def is_registered_strategy(name: str) -> bool:\n    return name in registry or name in registry.available_strategies()","tryCatchPattern":"try:\n    strat = registry.get(name)\nexcept KeyError as e:\n    raise ValueError(f'unknown strategy {name}; installed: {registry.available_strategies()}') from e","preventionTips":["Validate strategy names from config files at startup","Install optional extras (lightning[xla], deepspeed) before using their strategies"],"tags":["lightning","fabric","registry","unknown-strategy","key-error"],"backgroundTag":"unknown-strategy-name","analyzedSha":"9fed5c27d2a62ff0efd6c3573599921d6ff67c14","analyzedAt":"2026-08-28T11:52:41.083Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}