diff --git a/python/sglang/srt/managers/tokenizer_manager.py b/python/sglang/srt/managers/tokenizer_manager.py index 1a81f498b..5e6cf242a 100644 --- a/python/sglang/srt/managers/tokenizer_manager.py +++ b/python/sglang/srt/managers/tokenizer_manager.py @@ -807,6 +807,7 @@ class TokenizerManager: return await self._execute_profile(req) async def stop_profile(self): + self.auto_create_handle_loop() req = ProfileReq(type=ProfileReqType.STOP_PROFILE) return await self._execute_profile(req) @@ -816,11 +817,6 @@ class TokenizerManager: raise RuntimeError(result.message) return result - def stop_profile(self): - self.auto_create_handle_loop() - req = ProfileReq(type=ProfileReqType.STOP_PROFILE) - self.send_to_scheduler.send_pyobj(req) - async def start_expert_distribution_record(self): self.auto_create_handle_loop() await self.expert_distribution_communicator(ExpertDistributionReq.START_RECORD)