From 3b89aef0a85d75c22525e131c2c8cb7fc6e5dbac Mon Sep 17 00:00:00 2001 From: JeshuaRen <270813223@qq.com> Date: Tue, 6 May 2025 09:09:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=B7=A5=E4=BD=9C=E6=B5=81?= =?UTF-8?q?=E7=BB=91=E5=AE=9A=E6=A8=A1=E5=9E=8B=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sdks/pcmscheduler/jobset.go | 6 +++--- sdks/pcmscheduler/models.go | 8 +++++--- sdks/scheduler/models.go | 18 +++++++++--------- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/sdks/pcmscheduler/jobset.go b/sdks/pcmscheduler/jobset.go index 1057c0d..fa09286 100644 --- a/sdks/pcmscheduler/jobset.go +++ b/sdks/pcmscheduler/jobset.go @@ -61,7 +61,7 @@ type CreateInferenceJobResp struct { TaskId string `json:"taskId"` } -type CreatePCMJobReq struct { +type CreateAIJobReq struct { Name string `json:"name"` Description string `json:"description"` JobResources schsdk.JobResources `json:"jobResources"` @@ -126,7 +126,7 @@ type ScheduleData struct { ClusterIDs []schsdk.ClusterID `json:"clusterIDs"` } -func (c *Client) CreateInferenceJob(req CreatePCMJobReq, token string) (*CreateInferenceJobResp, error) { +func (c *Client) CreateInferenceJob(req CreateAIJobReq, token string) (*CreateInferenceJobResp, error) { targetUrl, err := url.JoinPath(c.baseURL, "inference/createTask") if err != nil { return nil, err @@ -160,7 +160,7 @@ func (c *Client) CreateInferenceJob(req CreatePCMJobReq, token string) (*CreateI } -func (c *Client) CreateJob(req CreatePCMJobReq, token string) (*CreateJobResp, error) { +func (c *Client) CreateJob(req CreateAIJobReq, token string) (*CreateJobResp, error) { targetUrl, err := url.JoinPath(c.baseURL, "schedule/createTask") if err != nil { return nil, err diff --git a/sdks/pcmscheduler/models.go b/sdks/pcmscheduler/models.go index 2221f64..e18f0b6 100644 --- a/sdks/pcmscheduler/models.go +++ b/sdks/pcmscheduler/models.go @@ -282,8 +282,8 @@ func (d *JobSubmitInfoBase) Noop() {} type PCMJobSubmitInfo struct { serder.Metadata `union:"pcm"` JobSubmitInfoBase - Type string `json:"type"` - Info CreatePCMJobReq `json:"info"` + Type string `json:"type"` + Info CreateAIJobReq `json:"info"` } type HPCJobSubmitInfo struct { @@ -441,7 +441,9 @@ var DataBindingTypeUnion = types.NewTypeUnion[DataBinding]( var _ = serder.UseTypeUnionInternallyTagged(&DataBindingTypeUnion, "type") -type DataBindingBase struct{} +type DataBindingBase struct { + RootPath string `json:"rootPath"` +} func (d *DataBindingBase) Noop() {} diff --git a/sdks/scheduler/models.go b/sdks/scheduler/models.go index 3f35cc3..8ab173b 100644 --- a/sdks/scheduler/models.go +++ b/sdks/scheduler/models.go @@ -178,15 +178,15 @@ func (d *DataBindingBase) Noop() {} type ModelBinding struct { serder.Metadata `union:"model"` DataBindingBase - Type string `json:"type"` - Name string `json:"name"` - Description string `json:"description"` - ClusterIDs []string `json:"clusterIDs"` - Category string `json:"category"` - ModelType string `json:"modelType"` - Env string `json:"env"` - Version string `json:"version"` - RepositoryName string `json:"repositoryName"` + Type string `json:"type"` + Name string `json:"name"` + Description string `json:"description"` + ClusterIDs []ClusterID `json:"clusterIDs"` + Category string `json:"category"` + ModelType string `json:"modelType"` + Env string `json:"env"` + Version string `json:"version"` + RepositoryName string `json:"repositoryName"` } type HPCJobInfo struct {