Merge pull request 'fix getadapterbymodel bugs' (#325) from tzwang/pcm-coordinator:master into master

Former-commit-id: 6035200a68b1f8c9665232203223cb11380ff97f
This commit is contained in:
tzwang 2024-10-24 16:14:37 +08:00
commit 437b1dbb3e
1 changed files with 13 additions and 1 deletions

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,