{"record":{"id":"42d037b25a7bebc4","repo":"sgl-project/sglang","slug":"manually-start-is-only-supported-yet","errorCode":null,"errorMessage":"manually start is only supported yet","messagePattern":"manually start is only supported yet","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/utils/profile_utils.py","lineNumber":139,"sourceCode":"\n        self.profiler_kwargs = dict(\n            activities=activities,\n            with_stack=with_stack,\n            record_shapes=record_shapes,\n            output_dir=output_dir,\n            output_prefix=profile_prefix,\n            profile_id=profile_id,\n        )\n\n        self.stage_based_trigger.configure(\n            num_steps=num_steps,\n            interesting_stages=profile_stages or [\"prefill\", \"decode\"],\n        )\n\n        return ProfileReqOutput(success=True, message=\"Succeeded\")\n\n    def manual_start(self):\n        raise NotImplementedError(\"manually start is only supported yet\")\n\n    def manual_stop(self):\n        raise NotImplementedError(\"manually stop is only supported yet\")\n\n    def _do_start(self, stage: Optional[str] = None):\n        logger.info(\n            f\"Profiling starts{f' for {stage}' if stage else ''}. \"\n            f\"Traces will be saved to: {self.profiler_kwargs['output_dir']} \"\n            f\"(with profile id: {self.profiler_kwargs['profile_id']})\",\n        )\n\n        assert self.profiler is None\n        # Fold the per-phase c_/g_ aggregates into the step span while this\n        # stage's profile is active (v2 auto-start path; reset in _do_stop).\n        set_detailed_annotations_enabled(self.detailed_annotations)\n        self.profiler = _ProfilerBase.create(\n            **self.profiler_kwargs,\n            ps=self.ps,","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/utils/profile_utils.py#L121-L157","documentation":"The profiler wrapper's manual_start is a stub — only the automatic (request/stage-triggered) start path is implemented. Calling manual_start raises NotImplementedError, signalling an unimplemented feature rather than misuse.","triggerScenarios":"A /start_profile API request with a 'manual' start mode (or calling manual_start directly) reaching this stub profiler implementation.","commonSituations":"Tooling or scripts assuming a manual start/stop profiling session is supported; API clients passing manual start flags not yet honored.","solutions":["Use the automatic start mode / default _start_profile flow instead of manual start","Update sglang — check release notes for when manual start becomes available","Guard API clients: catch NotImplementedError and fall back to auto profiling"],"exampleFix":"# before\nprofiler.manual_start()\n# after\nresult = await profiler.start(...)  # automatic trigger path","handlingStrategy":"fallback","validationCode":"import inspect\nassert not isinstance(getattr(profiler, 'manual_start', None), type(NotImplementedError)) or True\n# simplest: feature check\nfeature_ok = profiler.manual_start.__code__.co_names == () or True","typeGuard":"null","tryCatchPattern":"try:\n    profiler.manual_start()\nexcept NotImplementedError:\n    await profiler.start(...)  # automatic path","preventionTips":["Consult docs for supported profiling start modes before building tooling","Gate manual-mode UI on server capability","Prefer automatic request-driven profiling"],"tags":["profiling","not-implemented","sglang"],"backgroundTag":"unsupported-feature-invoked","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}