{"record":{"id":"b46c6a2a88326182","repo":"facebookresearch/detectron2","slug":"unknown-lr-scheduler","errorCode":null,"errorMessage":"Unknown LR scheduler: {}","messagePattern":"Unknown LR scheduler: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"detectron2/solver/build.py","lineNumber":314,"sourceCode":"            )\n        sched = MultiStepParamScheduler(\n            values=[cfg.SOLVER.GAMMA**k for k in range(len(steps) + 1)],\n            milestones=steps,\n            num_updates=cfg.SOLVER.MAX_ITER,\n        )\n    elif name == \"WarmupCosineLR\":\n        end_value = cfg.SOLVER.BASE_LR_END / cfg.SOLVER.BASE_LR\n        assert end_value >= 0.0 and end_value <= 1.0, end_value\n        sched = CosineParamScheduler(1, end_value)\n    elif name == \"WarmupStepWithFixedGammaLR\":\n        sched = StepWithFixedGammaParamScheduler(\n            base_value=1.0,\n            gamma=cfg.SOLVER.GAMMA,\n            num_decays=cfg.SOLVER.NUM_DECAYS,\n            num_updates=cfg.SOLVER.MAX_ITER,\n        )\n    else:\n        raise ValueError(\"Unknown LR scheduler: {}\".format(name))\n\n    sched = WarmupParamScheduler(\n        sched,\n        cfg.SOLVER.WARMUP_FACTOR,\n        min(cfg.SOLVER.WARMUP_ITERS / cfg.SOLVER.MAX_ITER, 1.0),\n        cfg.SOLVER.WARMUP_METHOD,\n        cfg.SOLVER.RESCALE_INTERVAL,\n    )\n    return LRMultiplier(optimizer, multiplier=sched, max_iter=cfg.SOLVER.MAX_ITER)\n","sourceCodeStart":296,"sourceCodeEnd":324,"githubUrl":"https://github.com/facebookresearch/detectron2/blob/a2f4a8771ab77e8411c26b27f24f9489a28a2453/detectron2/solver/build.py#L296-L324","documentation":"build_lr_scheduler only supports a fixed set of scheduler names (WarmupMultiStepLR, WarmupCosineLR, WarmupPolyLR, and fvcore-based composite names). Any other cfg.SOLVER.LR_SCHEDULER_NAME string is rejected.","triggerScenarios":"Setting cfg.SOLVER.LR_SCHEDULER_NAME to an unsupported/misspelled value such as 'cosine', 'step', or a custom name, then calling build_lr_scheduler(cfg, optimizer).","commonSituations":"Porting configs from other frameworks (mmdetection, torchvision) whose scheduler names differ; typos like 'WarmupCosine' without the LR suffix.","solutions":["Use one of: 'WarmupMultiStepLR', 'WarmupCosineLR', 'WarmupPolyLR', or an fvcore composite like 'WarmupCosineLR' variants / 'MultiStepLR'","Check the spelling against detectron2/solver/build.py's if/elif chain","Implement a custom scheduler and register it in your own build path"],"exampleFix":"# before\ncfg.SOLVER.LR_SCHEDULER_NAME = 'cosine'\n# after\ncfg.SOLVER.LR_SCHEDULER_NAME = 'WarmupCosineLR'","handlingStrategy":"validation","validationCode":"supported = {'WarmupMultiStepLR', 'WarmupCosineLR', 'WarmupPolyLR'}\nassert cfg.SOLVER.LR_SCHEDULER_NAME in supported or '+' in cfg.SOLVER.LR_SCHEDULER_NAME","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy scheduler names verbatim from detectron2 configs","Validate config keys before build_lr_scheduler"],"tags":["detectron2","lr-scheduler","config"],"backgroundTag":"unsupported-config-value","analyzedSha":"a2f4a8771ab77e8411c26b27f24f9489a28a2453","analyzedAt":"2026-08-27T12:08:21.260Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}