Skip to content

Commit

Permalink
update generated crd code and fix ci
Browse files Browse the repository at this point in the history
Signed-off-by: Jie Pu <i@jaypu.com>
  • Loading branch information
jaypume committed Jun 13, 2023
1 parent 0e43075 commit 6753b22
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
1 change: 0 additions & 1 deletion pkg/apis/sedna/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions pkg/globalmanager/controllers/lifelonglearning/upstream.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ func (c *Controller) appendStatusCondition(name, namespace string, cond sednav1.
func (c *Controller) updateStatusKnowledgeBase(name, namespace string, cd ConditionData) error {
client := c.client.LifelongLearningJobs(namespace)
return runtime.RetryUpdateStatus(name, namespace, func() error {

// check if models field exits
if cd.Output == nil || cd.Output.Models == nil || len(cd.Output.Models) == 0 {
klog.V(4).Infof("output models is nil, name is %s", name)
Expand All @@ -111,9 +110,11 @@ func (c *Controller) updateStatusKnowledgeBase(name, namespace string, cd Condit

numberOfSamples := 0
aiModels := sednav1.AIModels{}
aiclasses := sednav1.AIClasses{}
aiclasses.ListOfAIClasses = cd.Output.Models[0].Classes
aiclasses.NumberOfAIClasses = len(aiclasses.ListOfAIClasses)
aiModels.ListOfAIModels = make([]sednav1.AIModel, 0, len(cd.Output.Models))

aiClasses := sednav1.AIClasses{}
aiClasses.ListOfAIClasses = cd.Output.Models[0].Classes
aiClasses.NumberOfAIClasses = len(aiClasses.ListOfAIClasses)

for _, m := range cd.Output.Models {
for modelName, metrics := range m.CurrentMetric {
Expand Down Expand Up @@ -141,7 +142,7 @@ func (c *Controller) updateStatusKnowledgeBase(name, namespace string, cd Condit

kb := sednav1.KnowledgeBase{
AIModels: aiModels,
AIClasses: aiclasses,
AIClasses: aiClasses,
Samples: samples,
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/localcontroller/gmclient/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ type Input struct {
}

type Output struct {
// All the TaskInfo has been writen to "Model"
// All the TaskInfo has been written to "Model"
Models []map[string]interface{} `json:"models"`
OwnerInfo map[string]interface{} `json:"ownerInfo"`
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,9 @@ func (lm *Manager) evalTask(job *Job) error {
jobConfig.UniqueIdentifier, err)
}

// 这个触发器是指,LC已经告诉GM可以触发Eval worker了,
// 边侧在重启之后会ready,后续将会变成completed
// 这里的ready和completed状态不要和整体状态变迁图中的状态弄混淆。
// This trigger indicate that LC has told GM to trigger Eval worker,
// And the state of worker on the edge will be 'ready', then to 'completed'.
// Please don't confuse the two concepts with the state in the state transition diagram.
// https://github.com/kubeedge/sedna/blob/main/docs/proposals/images/incremental-learning-state-machine.png
if jobConfig.EvalTriggerStatus == TriggerReadyStatus {
payload, err := lm.triggerEvalTask(job)
Expand Down

0 comments on commit 6753b22

Please sign in to comment.