From cd2f76517d5e10aac7eef611c8bf4da7a9c69ebb Mon Sep 17 00:00:00 2001 From: Sanghun Lee Date: Mon, 2 Dec 2024 18:05:16 +0900 Subject: [PATCH] fix: Do not accumulate session occupying slots --- src/ai/backend/manager/models/session.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ai/backend/manager/models/session.py b/src/ai/backend/manager/models/session.py index b8cf91be58..b509a996d0 100644 --- a/src/ai/backend/manager/models/session.py +++ b/src/ai/backend/manager/models/session.py @@ -1309,7 +1309,7 @@ async def _get_and_transit( transited = session_row.determine_and_set_status(status_changed_at=now) def _calculate_session_occupied_slots(session_row: SessionRow): - session_occupying_slots = ResourceSlot.from_json({**session_row.occupying_slots}) + session_occupying_slots = ResourceSlot() for row in session_row.kernels: kernel_row = cast(KernelRow, row) kernel_allocs = kernel_row.occupied_slots