From 6170cdf10a7283cafe73eb98ab930069f06b4b0b Mon Sep 17 00:00:00 2001 From: Sherif Akoush Date: Tue, 28 Jan 2025 09:41:42 +0000 Subject: [PATCH] add todo note --- scheduler/pkg/store/memory.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scheduler/pkg/store/memory.go b/scheduler/pkg/store/memory.go index c9526a56f0..356a7fac3c 100644 --- a/scheduler/pkg/store/memory.go +++ b/scheduler/pkg/store/memory.go @@ -379,6 +379,8 @@ func (m *MemoryStore) updateLoadedModelsImpl( // note that we use len(modelVersion.GetAssignment()) to calculate the number of replicas as the status of the model at this point might not reflect the actual number of replicas // in modelVersion.state.AvailableReplicas (we call updateModelStatus later) + + // TODO: the conditions here keep growing, refactor or consider a simpler check. if replicaStateUpdated || modelVersion.state.State == ScheduleFailed || model.IsDeleted() || modelVersion.state.State == ModelProgressing || (modelVersion.state.State == ModelAvailable && len(modelVersion.GetAssignment()) < modelVersion.DesiredReplicas()) { logger.Debugf("Updating model status for model %s server %s", modelKey, serverKey)