@@ -40,9 +40,6 @@ import (
4040 poolutil "github.com/llm-d-incubation/workload-variant-autoscaler/internal/utils/pool"
4141)
4242
43- // NOTE: This is a placeholder for the scale-from-zero engine implementation.
44- // The actual logic for the scale-from-zero engine should be implemented here.
45-
4643type Engine struct {
4744 client client.Client
4845 executor executor.Executor
@@ -194,32 +191,34 @@ func (e *Engine) processInactiveVariant(ctx context.Context, va wvav1alpha1.Vari
194191 return err
195192 }
196193
197- // result := results["all_metrics"]
198- // for _, value := range result.Values {
199- // // Check for pending requests using queue size metrics
200- // metricName := value.Labels["__name__"]
201- // if metricName == "inference_pool_average_queue_size" && value.Value > 0 {
202- // // ctrl.Log.V(logging.DEBUG).Info(
203- // // "Target worklod has pending request, not scaling up", "metricName", metricName,
204- // // "metric", value.Labels, "value", value.Value)
205-
206- // ctrl.Log.Info(
207- // "Target worklod has pending request, not scaling up", "metricName", metricName,
208- // "metric", value.Labels, "value", value.Value)
209- // break
210- // }
211- // // }
212-
213- // // Scale up
194+ result := results ["all_metrics" ]
195+ for _ , value := range result .Values {
196+ // Check for pending requests using queue size metrics
197+ metricName := value .Labels ["__name__" ]
198+ if metricName == "inference_pool_average_queue_size" && value .Value > 0 {
199+ // ctrl.Log.V(logging.DEBUG).Info(
200+ // "Target worklod has pending request, not scaling up", "metricName", metricName,
201+ // "metric", value.Labels, "value", value.Value)
202+
203+ ctrl .Log .Info (
204+ "Target worklod has pending request, not scaling up" , "metricName" , metricName ,
205+ "metric" , value .Labels , "value" , value .Value )
206+ break
207+ }
208+ }
209+
210+ // **** Compare the modelname in the VA and EPP collected metrics ****
211+ // TO DO: Compute scalefromzero decision and implement direct actuati
212+
213+ // // Scale up from zero to one
214+ // ADD A NOTE HERE:
214215 // err = e.Actuator.ScaleTargetObject(ctx, unstructuredObj, int32(1))
215216 // if err != nil {
216217 // ctrl.Log.Error(err, "Error scaling up Target Workload", "EPP source", pool.EndpointPicker.ServiceName)
217218 // return err
218219 // }
219220
220221 ctrl .Log .Info ("Target workload was succesfully scaling up" , "EPP source" , pool .EndpointPicker .ServiceName )
221- // **** Compare the modelname in the VA and EPP collected metrics ****
222- // TO DO: Compute scalefromzero decision and implement direct actuation
223222
224223 return nil
225224}
0 commit comments