Browse Source

fix: update modelarts ServiceName now.Unix of ai

pull/315/head
qiwang 1 year ago
parent
commit
0003d147a0
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      internal/storeLink/modelarts.go

+ 4
- 1
internal/storeLink/modelarts.go View File

@@ -791,11 +791,14 @@ func (m *ModelArtsLink) CreateInferDeployInstance(ctx context.Context, option *o
}
var configItems []*modelarts.ServiceConfig
configItems = append(configItems, configParam)
now := time.Now()
timestampSec := now.Unix()
str := strconv.FormatInt(timestampSec, 10)
req := &modelarts.CreateServiceReq{
Platform: m.platform,
Config: configItems,
InferType: "real-time",
ServiceName: option.ModelName + "_" + option.ModelType + "_" + Npu,
ServiceName: option.ModelName + "_" + option.ModelType + "_" + Npu + "_" + str,
}
ctx, cancel := context.WithTimeout(context.Background(), 150*time.Second)
defer cancel()


Loading…
Cancel
Save