fix getadepterByModel bugs
Former-commit-id: 1dc4ccd87fc22d7df3ebc427caede9aa69a82a0b
This commit is contained in:
parent
1bbb35d3cf
commit
92428bcc06
|
@ -38,7 +38,19 @@ func (l *GetAdaptersByModelLogic) GetAdaptersByModel(req *types.GetAdaptersByMod
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, cluster := range clusters.List {
|
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 {
|
if exist {
|
||||||
c := &types.ClusterAvail{
|
c := &types.ClusterAvail{
|
||||||
ClusterId: cluster.Id,
|
ClusterId: cluster.Id,
|
||||||
|
|
Loading…
Reference in New Issue