Skip to content

Commit 6753b22

Browse files
committed
update generated crd code and fix ci
Signed-off-by: Jie Pu <i@jaypu.com>
1 parent 0e43075 commit 6753b22

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

pkg/apis/sedna/v1alpha1/zz_generated.deepcopy.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/globalmanager/controllers/lifelonglearning/upstream.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ func (c *Controller) appendStatusCondition(name, namespace string, cond sednav1.
102102
func (c *Controller) updateStatusKnowledgeBase(name, namespace string, cd ConditionData) error {
103103
client := c.client.LifelongLearningJobs(namespace)
104104
return runtime.RetryUpdateStatus(name, namespace, func() error {
105-
106105
// check if models field exits
107106
if cd.Output == nil || cd.Output.Models == nil || len(cd.Output.Models) == 0 {
108107
klog.V(4).Infof("output models is nil, name is %s", name)
@@ -111,9 +110,11 @@ func (c *Controller) updateStatusKnowledgeBase(name, namespace string, cd Condit
111110

112111
numberOfSamples := 0
113112
aiModels := sednav1.AIModels{}
114-
aiclasses := sednav1.AIClasses{}
115-
aiclasses.ListOfAIClasses = cd.Output.Models[0].Classes
116-
aiclasses.NumberOfAIClasses = len(aiclasses.ListOfAIClasses)
113+
aiModels.ListOfAIModels = make([]sednav1.AIModel, 0, len(cd.Output.Models))
114+
115+
aiClasses := sednav1.AIClasses{}
116+
aiClasses.ListOfAIClasses = cd.Output.Models[0].Classes
117+
aiClasses.NumberOfAIClasses = len(aiClasses.ListOfAIClasses)
117118

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

142143
kb := sednav1.KnowledgeBase{
143144
AIModels: aiModels,
144-
AIClasses: aiclasses,
145+
AIClasses: aiClasses,
145146
Samples: samples,
146147
}
147148

pkg/localcontroller/gmclient/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ type Input struct {
5757
}
5858

5959
type Output struct {
60-
// All the TaskInfo has been writen to "Model"
60+
// All the TaskInfo has been written to "Model"
6161
Models []map[string]interface{} `json:"models"`
6262
OwnerInfo map[string]interface{} `json:"ownerInfo"`
6363
}

pkg/localcontroller/managers/lifelonglearning/lifelonglearningjob.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,9 @@ func (lm *Manager) evalTask(job *Job) error {
281281
jobConfig.UniqueIdentifier, err)
282282
}
283283

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

0 commit comments

Comments
 (0)