存算联动修改

Former-commit-id: d8b82e03b93052830863e2b335af4706d254c43b
This commit is contained in:
tzwang 2023-10-31 16:28:49 +08:00
parent 07bedcda4d
commit 696d7a7520
2 changed files with 2 additions and 10 deletions

View File

@ -5,10 +5,8 @@ import (
"gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/svc" "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/jcce-pcm/pcm-coordinator/pkg/models" "gitlink.org.cn/jcce-pcm/pcm-coordinator/pkg/models"
"gitlink.org.cn/jcce-pcm/pcm-coordinator/pkg/utils" "gitlink.org.cn/jcce-pcm/pcm-coordinator/pkg/utils"
"gitlink.org.cn/jcce-pcm/pcm-coordinator/pkg/utils/timeutils"
"gitlink.org.cn/jcce-pcm/pcm-participant-octopus/octopus" "gitlink.org.cn/jcce-pcm/pcm-participant-octopus/octopus"
"strings" "strings"
"time"
) )
type OctopusLink struct { type OctopusLink struct {
@ -122,13 +120,11 @@ func (o *OctopusLink) SubmitTask(imageId string, cmd string, params []string, re
prms = append(prms, &p) prms = append(prms, &p)
} }
dateStr := timeutils.UnixTimeToString(time.Now().Unix())
req := &octopus.CreateTrainJobReq{ req := &octopus.CreateTrainJobReq{
Platform: o.participant.Name, Platform: o.participant.Name,
Params: &octopus.CreateTrainJobParam{ Params: &octopus.CreateTrainJobParam{
ImageId: imageId, ImageId: imageId,
Name: TASK_NAME_PREFIX + UNDERSCORE + utils.RandomString(7) + UNDERSCORE + dateStr, Name: TASK_NAME_PREFIX + UNDERSCORE + utils.RandomString(17),
ResourcePool: RESOURCE_POOL, ResourcePool: RESOURCE_POOL,
Config: []*octopus.Config{ Config: []*octopus.Config{
{ {

View File

@ -6,10 +6,8 @@ import (
"gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/svc" "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/svc"
"gitlink.org.cn/jcce-pcm/pcm-coordinator/pkg/models" "gitlink.org.cn/jcce-pcm/pcm-coordinator/pkg/models"
"gitlink.org.cn/jcce-pcm/pcm-coordinator/pkg/utils" "gitlink.org.cn/jcce-pcm/pcm-coordinator/pkg/utils"
"gitlink.org.cn/jcce-pcm/pcm-coordinator/pkg/utils/timeutils"
"gitlink.org.cn/jcce-pcm/pcm-participant-ac/hpcAC" "gitlink.org.cn/jcce-pcm/pcm-participant-ac/hpcAC"
"strings" "strings"
"time"
) )
type ShuguangAi struct { type ShuguangAi struct {
@ -74,8 +72,6 @@ func (s *ShuguangAi) SubmitTask(imageId string, cmd string, params []string, res
return nil, err return nil, err
} }
dateStr := timeutils.UnixTimeToString(time.Now().Unix())
//python参数 //python参数
var pythonArg string var pythonArg string
for _, param := range params { for _, param := range params {
@ -85,7 +81,7 @@ func (s *ShuguangAi) SubmitTask(imageId string, cmd string, params []string, res
req := &hpcAC.SubmitPytorchTaskReq{ req := &hpcAC.SubmitPytorchTaskReq{
Params: &hpcAC.SubmitPytorchTaskParams{ Params: &hpcAC.SubmitPytorchTaskParams{
TaskName: TASK_PYTORCH_PREFIX + UNDERSCORE + utils.RandomString(7) + UNDERSCORE + dateStr, TaskName: TASK_PYTORCH_PREFIX + UNDERSCORE + utils.RandomString(17),
WorkPath: WorkPath, WorkPath: WorkPath,
IsDistributed: false, IsDistributed: false,
IsHvd: false, IsHvd: false,