modified shuguangAi implementations
Former-commit-id: ec3fe090a5fc92df53e058aa6602923dca56e089
This commit is contained in:
parent
41474ecaff
commit
e2ca3b5be4
|
@ -1,9 +1,11 @@
|
||||||
package option
|
package option
|
||||||
|
|
||||||
type AiOption struct {
|
type AiOption struct {
|
||||||
AiType string // shuguangAi/octopus
|
//AiType string // shuguangAi/octopus
|
||||||
ResourceType string // cpu/gpu/compute card
|
ResourceType string // cpu/gpu/compute card
|
||||||
TaskType string // pytorch/tensorflow
|
TaskType string // pytorch/tensorflow
|
||||||
|
DatasetsType string
|
||||||
|
CodeType string
|
||||||
|
|
||||||
ImageId string
|
ImageId string
|
||||||
SpecId string
|
SpecId string
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package strategy
|
package strategy
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/pkg/errors"
|
"errors"
|
||||||
"gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/scheduler/entity"
|
"gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/scheduler/entity"
|
||||||
"gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/scheduler/strategy/param"
|
"gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/scheduler/strategy/param"
|
||||||
)
|
)
|
||||||
|
|
|
@ -210,9 +210,14 @@ func (o *ShuguangAi) GetResourceSpecs() (*collector.ResourceSpecs, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ShuguangAi) Execute(option *option.AiOption) (interface{}, error) {
|
func (o *ShuguangAi) Execute(option *option.AiOption) (interface{}, error) {
|
||||||
task, err := o.SubmitTask(option.ImageId, option.Cmd, option.Envs, option.Params, option.ResourceId, option.AiType)
|
o.generateSubmitParams(option)
|
||||||
|
task, err := o.SubmitTask(option.ImageId, option.Cmd, option.Envs, option.Params, option.ResourceId, option.TaskType)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return task, nil
|
return task, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (o *ShuguangAi) generateSubmitParams(option *option.AiOption) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue