Ordering policy of resource presets #1633
Labels
comp:manager
Related to Manager component
effort:normal
Need to understand a few modules / some extent of contextual or historical information.
urgency:3
Must be finished within a certain time frame.
Milestone
Currently, resource presets are only alphabetically ordered (when requesting a specific set of resource presets by names):
backend.ai/src/ai/backend/manager/models/resource_preset.py
Line 88 in dec5284
or unordered (when listing all resource presets at once):
backend.ai/src/ai/backend/manager/models/resource_preset.py
Line 70 in dec5284
Let's add an option to explicitly order them:
LEXICOGRAPHIC_ASC
: alphabetically orderedLEXICOGRAPHIC_DESC
: alphabetically reverse-ordered (new)RESOURCE_SIZE_ASC
: smaller resource preset first (new)RESOURCE_SIZE_DESC
: larger resource preset first (new)To define the relative size of resource presets, we should have a resource slot precedence to make them comparable with each other. Fortunately, we already apply a similar precedence-based ordering when calculating the optimal hardware layouts in the agents as the allocation order config:
backend.ai/configs/agent/sample.toml
Line 286 in dec5284
We also need to add a new, similar shared config option to separately set the resource slot precedence for the UI displays.
The text was updated successfully, but these errors were encountered: