Documentation
¶
Overview ¶
Package mmcacheaffinity scores endpoints from multimodal encoder-cache match info produced by the request-control multimodal data producer.
Index ¶
Constants ¶
View Source
const (
// Type is the type name used to register the multimodal encoder-cache scorer.
Type = "mm-embeddings-cache-scorer"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// ProducerName scopes the data key to a specific named producer instance.
// Leave empty to consume from the default (unnamed) producer.
ProducerName string `json:"producerName,omitempty"`
}
Config holds optional configuration for the scorer.
type Scorer ¶
type Scorer struct {
// contains filtered or unexported fields
}
Scorer computes normalized endpoint affinity from produced multimodal match data.
func New ¶
New creates a Scorer. producerName scopes the data key to a specific producer instance; pass an empty string to use the default producer's key.
func (*Scorer) Category ¶
func (s *Scorer) Category() scheduling.ScorerCategory
Category returns the scorer category.
func (*Scorer) Consumes ¶
func (s *Scorer) Consumes() plugin.DataDependencies
Consumes returns the endpoint data consumed by this scorer.
func (*Scorer) Score ¶
func (s *Scorer) Score(ctx context.Context, req *scheduling.InferenceRequest, endpoints []scheduling.Endpoint) map[scheduling.Endpoint]float64
Score scores endpoints by matched multimodal encoder-cache item size divided by total multimodal request item size.
Click to show internal directories.
Click to hide internal directories.