diff --git a/python/sglang/srt/managers/scheduler_update_weights_mixin.py b/python/sglang/srt/managers/scheduler_update_weights_mixin.py index 4a5694571..1fde62ff1 100644 --- a/python/sglang/srt/managers/scheduler_update_weights_mixin.py +++ b/python/sglang/srt/managers/scheduler_update_weights_mixin.py @@ -106,6 +106,10 @@ class SchedulerUpdateWeightsMixin: def release_memory_occupation( self: Scheduler, recv_req: ReleaseMemoryOccupationReqInput ): + assert ( + self._is_no_request() + ), "release_memory_occupation should be called only when no ongoing request." + tags = recv_req.tags if tags is None or len(tags) == 0: