Skip to content

Commit

Permalink
update note in code
Browse files Browse the repository at this point in the history
  • Loading branch information
sakoush committed Jan 28, 2025
1 parent 5899013 commit 0d73987
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scheduler/pkg/store/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,8 @@ func (m *MemoryStore) updateLoadedModelsImpl(
// also send an update for progressing models so the operator can update the status in the case of a network glitch where the model generation has been updated
// also send an update if the model is not yet at desired replicas, if we have partial scheduling

// 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)
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)
Expand Down

0 comments on commit 0d73987

Please sign in to comment.