Browse Source

fix getadepterByModel bugs

Former-commit-id: 1dc4ccd87f
pull/325/head
tzwang 1 year ago
parent
commit
92428bcc06
1 changed files with 13 additions and 1 deletions
  1. +13
    -1
      internal/logic/inference/getadaptersbymodellogic.go

+ 13
- 1
internal/logic/inference/getadaptersbymodellogic.go View File

@@ -38,7 +38,19 @@ func (l *GetAdaptersByModelLogic) GetAdaptersByModel(req *types.GetAdaptersByMod
}

for _, cluster := range clusters.List {
exist := l.svcCtx.Scheduler.AiService.InferenceAdapterMap[adapter.Id][cluster.Id].CheckModelExistence(l.ctx, req.ModelName, req.ModelType)

cmap, found := l.svcCtx.Scheduler.AiService.InferenceAdapterMap[adapter.Id]
if !found {
continue
}

iCluster, found := cmap[cluster.Id]
if !found {
continue
}

exist := iCluster.CheckModelExistence(l.ctx, req.ModelName, req.ModelType)

if exist {
c := &types.ClusterAvail{
ClusterId: cluster.Id,


Loading…
Cancel
Save