@@ -148,25 +148,26 @@ func (p *SchedulerProfile) runFilterPlugins(ctx context.Context, request *types.
148
148
}
149
149
150
150
func (p * SchedulerProfile ) runScorerPlugins (ctx context.Context , request * types.LLMRequest , cycleState * types.CycleState , pods []types.Pod ) map [types.Pod ]float64 {
151
- loggerDebug := log .FromContext (ctx ). V ( logutil . DEBUG )
152
- loggerDebug .Info ("Before running scorer plugins" , "pods" , pods )
151
+ logger := log .FromContext (ctx )
152
+ logger . V ( logutil . DEBUG ) .Info ("Before running scorer plugins" , "pods" , pods )
153
153
154
154
weightedScorePerPod := make (map [types.Pod ]float64 , len (pods ))
155
155
for _ , pod := range pods {
156
156
weightedScorePerPod [pod ] = float64 (0 ) // initialize weighted score per pod with 0 value
157
157
}
158
158
// Iterate through each scorer in the chain and accumulate the weighted scores.
159
159
for _ , scorer := range p .scorers {
160
- loggerDebug .Info ("Running scorer plugin" , "plugin" , scorer .TypedName ())
160
+ logger . V ( logutil . DEBUG ) .Info ("Running scorer plugin" , "plugin" , scorer .TypedName ())
161
161
before := time .Now ()
162
162
scores := scorer .Score (ctx , cycleState , request , pods )
163
163
metrics .RecordPluginProcessingLatency (ScorerExtensionPoint , scorer .TypedName ().Type , scorer .TypedName ().Name , time .Since (before ))
164
164
for pod , score := range scores { // weight is relative to the sum of weights
165
+ logger .V (logutil .DEBUG ).Info ("Calculated score" , "plugin" , scorer .TypedName (), "endpoint" , pod .GetPod ().NamespacedName , "score" , score )
165
166
weightedScorePerPod [pod ] += enforceScoreRange (score ) * float64 (scorer .Weight ())
166
167
}
167
- loggerDebug .Info ("Completed running scorer plugin successfully" , "plugin" , scorer .TypedName ())
168
+ logger . V ( logutil . DEBUG ) .Info ("Completed running scorer plugin successfully" , "plugin" , scorer .TypedName ())
168
169
}
169
- loggerDebug .Info ("Completed running scorer plugins successfully" )
170
+ logger . V ( logutil . DEBUG ) .Info ("Completed running scorer plugins successfully" )
170
171
171
172
return weightedScorePerPod
172
173
}
0 commit comments