Documentation
¶
Overview ¶
Package loadaware provides a load-aware scorer plugin for the epp.
Index ¶
Constants ¶
const ( // LoadAwareType is the type of the LoadAware scorer LoadAwareType = "load-aware-scorer" // QueueThresholdDefault defines the default queue threshold value QueueThresholdDefault = 128 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LoadAware ¶
type LoadAware struct {
// contains filtered or unexported fields
}
LoadAware scorer that is based on load
func NewLoadAware ¶
NewLoadAware creates a new load based scorer
func (*LoadAware) Category ¶
func (s *LoadAware) Category() scheduling.ScorerCategory
Category returns the preference the scorer applies when scoring candidate endpoints.
func (*LoadAware) Score ¶
func (s *LoadAware) Score(_ context.Context, _ *scheduling.InferenceRequest, endpoints []scheduling.Endpoint) map[scheduling.Endpoint]float64
Score scores the given pod in range of 0-1 Currently metrics contains number of requests waiting in the queue, there is no information about number of requests that can be processed in the given pod immediately. Pod with empty waiting requests queue is scored with 0.5 Pod with requests in the queue will get score between 0.5 and 0. Score 0 will get pod with number of requests in the queue equal to the threshold used in load-based filter In the future, pods with additional capacity will get score higher than 0.5