chore: Remove session scheduler related types no longer used #2705
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
During the process of refactoring tasks of different characters, I discovered that these types are no longer in use.
It seems advisable to remove these types for maintenance.
Details
Remove the following types no longer used.
AgentContext
AgentRow
in refactor: Split the session & kernel tables with ORM migration #576.ExistingSession
SessionRow
in refactor: Split the session & kernel tables with ORM migration #576.PendingSession
SessionRow
in refactor: Split the session & kernel tables with ORM migration #576.SchedulingPredicate
SchedulingPredicate
is used.StartTaskArgs
StartTaskArgs
type, but it is no longer present in version 20.09.Replace the
KernelInfo
type argument ofassign_agent_for_kernel
withKernelRow
.The
KernelInfo
type is not actually used, and at the call site ofassign_agent_for_kernel
, a value of typeKernelRow
is passed to that parameter. You can see thekernel
passed to theassign_agent_for_kernel
isKernelRow
type in the below code.backend.ai/src/ai/backend/manager/scheduler/dispatcher.py
Lines 1027 to 1094 in 62eca72
Note
Unlike other types, I couldn't find any evidence that the
SchedulingPredicate
type was used in the past, so there might be some misunderstanding on my part.If that's the case, please let me know. If it is a useful type somewhere, we can fix it by replacing the removed
PendingSession
type withSessionRow
.Checklist: (if applicable)