Skip to content

Commit

Permalink
Merge pull request #570 from xxxxibo/main
Browse files Browse the repository at this point in the history
Update displayname in modelserver
  • Loading branch information
bjwswang authored Jan 18, 2024
2 parents 7ea531f + c502659 commit 7f85ef7
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions pkg/worker/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package worker
import (
"context"
"fmt"
"reflect"

"github.com/pkg/errors"
appsv1 "k8s.io/api/apps/v1"
Expand Down Expand Up @@ -341,7 +342,11 @@ func (podWorker *PodWorker) BeforeStart(ctx context.Context) error {
}
}
case Update:
// Skip update when found
embedder1 := podWorker.Worker().BuildEmbedder()
if !reflect.DeepEqual(embedder.Spec, embedder1.Spec) {
embedder.Spec = embedder1.Spec
return podWorker.c.Update(ctx, embedder)
}
case Panic:
return err
}
Expand All @@ -364,7 +369,11 @@ func (podWorker *PodWorker) BeforeStart(ctx context.Context) error {
}
}
case Update:
// Skip update when found
llm1 := podWorker.Worker().BuildLLM()
if !reflect.DeepEqual(llm.Spec, llm1.Spec) {
llm.Spec = llm1.Spec
return podWorker.c.Update(ctx, llm)
}
case Panic:
return err
}
Expand Down

0 comments on commit 7f85ef7

Please sign in to comment.