{"record":{"id":"61c1069139f4644f","repo":"sgl-project/sglang","slug":"unknown-scheduler-name","errorCode":null,"errorMessage":"Unknown scheduler: {name}","messagePattern":"Unknown scheduler: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/debug_utils/schedule_simulator/entrypoint.py","lineNumber":128,"sourceCode":"            seed=args.synth_seed,\n        )\n    return requests\n\n\ndef _create_router(name: str, total_gpus: int):\n    if name == \"random\":\n        return RandomRouter(total_gpus)\n    if name == \"round_robin\":\n        return RoundRobinRouter(total_gpus)\n    if name == \"sticky\":\n        return StickyRouter(total_gpus)\n    raise ValueError(f\"Unknown router: {name}\")\n\n\ndef _create_scheduler(name: str):\n    if name == \"fifo\":\n        return FIFOScheduler()\n    raise ValueError(f\"Unknown scheduler: {name}\")\n\n\ndef main(args: argparse.Namespace) -> SimulationResult:\n    if args.synth_seed is not None:\n        random.seed(args.synth_seed)\n    requests = _load_requests(args)\n    total_gpus = args.num_gpus_per_engine * args.num_engines\n    router = _create_router(args.router, total_gpus)\n    scheduler = _create_scheduler(args.scheduler)\n\n    sim = Simulator(\n        num_gpus_per_engine=args.num_gpus_per_engine,\n        router=router,\n        scheduler=scheduler,\n        recorders=[\n            BatchSizeBalancednessRecorder(),\n            AttentionComputeBalancednessRecorder(),\n            AvgBatchSizeRecorder(),","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/debug_utils/schedule_simulator/entrypoint.py#L110-L146","documentation":"Raised by the schedule simulator CLI factory _create_scheduler when the --scheduler argument is not 'fifo', the only implemented scheduling policy. The factory pattern means any new policy must be explicitly added; everything else falls through to this ValueError.","triggerScenarios":"Running the simulator with args.scheduler set to anything other than 'fifo' (e.g. --scheduler lifo, --scheduler priority).","commonSituations":"Typos in CLI flags; expecting priority or SJF policies that the simulator does not implement yet; scripting the CLI with an unquoted/empty variable.","solutions":["Use --scheduler fifo (currently the only supported value)","Check for typos and shell-variable expansion issues (empty string)","Implement and register a new scheduler class in _create_scheduler if you need another policy"],"exampleFix":"# before\npython -m ...schedule_simulator.entrypoint --scheduler priority\n\n# after\npython -m ...schedule_simulator.entrypoint --scheduler fifo","handlingStrategy":"validation","validationCode":"if args.scheduler != 'fifo':\n    parser.error(\"--scheduler currently supports only 'fifo'\")","typeGuard":"def is_known_scheduler(name: str) -> bool:\n    return name == 'fifo'","tryCatchPattern":"try:\n    sched = _create_scheduler(args.scheduler)\nexcept ValueError as e:\n    parser.error(str(e))","preventionTips":["Use argparse choices=['fifo']","Watch for empty-string shell variables passed as the flag value"],"tags":["cli-arguments","simulation","schedule-simulator","sglang"],"backgroundTag":"invalid-enum-value","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}