fix(autoscaling): extract load model from Route() and use as well when doing autoscale - #9270
Merged
Conversation
…n doing autoscale Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request adds support for storing and retrieving model load metadata to enable the reconciler to reliably replicate model loads during scale-up. It introduces new methods and fields for saving backend type and serialized model options, and refactors the model scheduling logic to use this metadata when loading models on new nodes. The changes also include updates to interfaces, implementations, and test fakes.
Model load metadata storage and retrieval:
SetNodeModelLoadInfoandGetModelLoadInfomethods to theModelRouterinterface and its implementations, allowing the backend type and serialized model options to be saved and fetched for each loaded model. [1] [2]NodeModelstruct withBackendTypeandModelOptsBlobfields to persist this metadata in the database.Model scheduling and loading refactor:
scheduleAndLoadhelper method inSmartRouterto centralize the logic for picking a node, staging files, loading the model, and recording metadata.RouteandScheduleAndLoadModelto use stored metadata for consistent model loading and replica creation, improving reliability during reconciler-driven scale-ups. [1] [2]Test updates:
model_router_test.goandrouter_test.goto implement the new interface methods, ensuring test coverage for the new logic. [1] [2]Miscellaneous:
fmtin test files.Notes for Reviewers
Signed commits