updated textinfer api
Former-commit-id: 0ae4e41fae1f4bd8ee8d8c6185cd43e38c3d6068
This commit is contained in:
parent
fd0e823490
commit
c0b64237ba
|
@ -8,6 +8,7 @@ import (
|
||||||
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/scheduler/schedulers/option"
|
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/scheduler/schedulers/option"
|
||||||
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/scheduler/service/collector"
|
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/scheduler/service/collector"
|
||||||
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/scheduler/strategy"
|
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/scheduler/strategy"
|
||||||
|
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/storeLink"
|
||||||
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
|
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
|
||||||
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
|
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
|
||||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/constants"
|
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/constants"
|
||||||
|
@ -183,6 +184,9 @@ func infer(opt *option.InferOption, clusters []*strategy.AssignedCluster, ts []s
|
||||||
c := cluster
|
c := cluster
|
||||||
go func() {
|
go func() {
|
||||||
imageUrls, err := collectorMap[c.ClusterId].GetInferUrl(ctx, opt)
|
imageUrls, err := collectorMap[c.ClusterId].GetInferUrl(ctx, opt)
|
||||||
|
for i, _ := range imageUrls {
|
||||||
|
imageUrls[i].Url = imageUrls[i].Url + storeLink.FORWARD_SLASH + "image"
|
||||||
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
wg.Done()
|
wg.Done()
|
||||||
return
|
return
|
||||||
|
|
|
@ -888,7 +888,7 @@ func (o *OctopusLink) GetInferUrl(ctx context.Context, option *option.InferOptio
|
||||||
url := strings.Replace(notebook.Tasks[0].Url, FORWARD_SLASH, "", -1)
|
url := strings.Replace(notebook.Tasks[0].Url, FORWARD_SLASH, "", -1)
|
||||||
names := strings.Split(notebook.AlgorithmName, UNDERSCORE)
|
names := strings.Split(notebook.AlgorithmName, UNDERSCORE)
|
||||||
imageUrl := &collector.InferUrl{
|
imageUrl := &collector.InferUrl{
|
||||||
Url: DOMAIN + url + FORWARD_SLASH + "image",
|
Url: DOMAIN + url,
|
||||||
Card: names[2],
|
Card: names[2],
|
||||||
}
|
}
|
||||||
imageUrls = append(imageUrls, imageUrl)
|
imageUrls = append(imageUrls, imageUrl)
|
||||||
|
|
Loading…
Reference in New Issue