|
|
|
@@ -57,6 +57,7 @@ type AiResult struct { |
|
|
|
Replica int32 |
|
|
|
Card string |
|
|
|
Msg string |
|
|
|
Output string |
|
|
|
} |
|
|
|
|
|
|
|
func NewAiScheduler(ctx context.Context, val string, scheduler *scheduler.Scheduler, option *option.AiOption) (*AiScheduler, error) { |
|
|
|
@@ -206,6 +207,7 @@ func (as *AiScheduler) AssignTask(clusters []*strategy.AssignedCluster, mode int |
|
|
|
result.ClusterId = c.ClusterId |
|
|
|
result.Strategy = as.option.StrategyName |
|
|
|
result.Card = opt.ComputeCard |
|
|
|
result.Output = opt.Output |
|
|
|
|
|
|
|
ch <- result |
|
|
|
wg.Done() |
|
|
|
@@ -319,9 +321,7 @@ func (as *AiScheduler) handleErrors(errs []interface{}, clusters []*strategy.Ass |
|
|
|
} |
|
|
|
|
|
|
|
//report status |
|
|
|
if mode == executor.SUBMIT_MODE_STORAGE_SCHEDULE { |
|
|
|
_ = jcs.StatusReport(as.AiService.Conf.JcsMiddleware.JobStatusReportUrl, report) |
|
|
|
} |
|
|
|
_ = jcs.StatusReport(as.AiService.Conf.JcsMiddleware.JobStatusReportUrl, report) |
|
|
|
|
|
|
|
logx.Errorf(errors.New(errmsg).Error()) |
|
|
|
return errors.New(errmsg) |
|
|
|
@@ -343,6 +343,7 @@ func updateAiOptionByMode(cluster *strategy.AssignedCluster, opt *option.AiOptio |
|
|
|
|
|
|
|
opt.ResourcesRequired = cluster.ResourcesRequired |
|
|
|
|
|
|
|
opt.Output = cluster.Output |
|
|
|
default: |
|
|
|
|
|
|
|
} |
|
|
|
|