Merge pull request 'save params output to taskai' (#467) from tzwang/pcm-coordinator:master into master

This commit is contained in:
tzwang 2025-04-24 17:05:17 +08:00
commit 7571b341e8
1 changed files with 10 additions and 1 deletions

View File

@ -29,6 +29,7 @@ import (
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/scheduler/service/utils/jcs"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/scheduler/strategy"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/scheduler/strategy/param"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/storeLink"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/constants"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/models"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/response"
@ -37,6 +38,7 @@ import (
"gitlink.org.cn/JointCloud/pcm-octopus/octopus"
"gitlink.org.cn/JointCloud/pcm-openi/model"
"strconv"
"strings"
"sync"
)
@ -343,7 +345,14 @@ func updateAiOptionByMode(cluster *strategy.AssignedCluster, opt *option.AiOptio
opt.ResourcesRequired = cluster.ResourcesRequired
opt.Output = cluster.Output
// assume params include output for modelarts
for _, param := range cluster.Params {
s := strings.Split(param, storeLink.COMMA)
if s[0] == "output" {
opt.Output = s[1]
}
}
default:
}