@@ -148,25 +148,26 @@ func (p *SchedulerProfile) runFilterPlugins(ctx context.Context, request *types.
148148}
149149
150150func (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 )
153153
154154 weightedScorePerPod := make (map [types.Pod ]float64 , len (pods ))
155155 for _ , pod := range pods {
156156 weightedScorePerPod [pod ] = float64 (0 ) // initialize weighted score per pod with 0 value
157157 }
158158 // Iterate through each scorer in the chain and accumulate the weighted scores.
159159 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 ())
161161 before := time .Now ()
162162 scores := scorer .Score (ctx , cycleState , request , pods )
163163 metrics .RecordPluginProcessingLatency (ScorerExtensionPoint , scorer .TypedName ().Type , scorer .TypedName ().Name , time .Since (before ))
164164 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 )
165166 weightedScorePerPod [pod ] += enforceScoreRange (score ) * float64 (scorer .Weight ())
166167 }
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 ())
168169 }
169- loggerDebug .Info ("Completed running scorer plugins successfully" )
170+ logger . V ( logutil . DEBUG ) .Info ("Completed running scorer plugins successfully" )
170171
171172 return weightedScorePerPod
172173}
0 commit comments