v2inferenceprotocol

package
v1.30.1-alpha.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InferPowerConsumptionRequestInputName = "predict-prob"
)
View Source
var (
	InferResponseTimeRequestInputName = "predict-prob"
)

Functions

This section is empty.

Types

type PowerConsumptionPredictor

type PowerConsumptionPredictor struct {
	// contains filtered or unexported fields
}

func NewPowerConsumptionPredictor

func NewPowerConsumptionPredictor(address, modelName, modelVersion string, insecureSkipVerify bool, timeout time.Duration, editorFns ...util.RequestEditorFn) *PowerConsumptionPredictor

func (*PowerConsumptionPredictor) Endpoint

func (p *PowerConsumptionPredictor) Endpoint() (string, error)

Endpoint constructs the API endpoint.

There is 2 types of URL.

func (*PowerConsumptionPredictor) Predict

func (p *PowerConsumptionPredictor) Predict(ctx context.Context, cpuUsage, inletTemp, deltaP float64) (watt float64, err error)

type ResponseTimePredictor

type ResponseTimePredictor struct {
	// contains filtered or unexported fields
}

func NewResponseTimePredictor

func NewResponseTimePredictor(urlTemplate string, insecureSkipVerify bool, timeout time.Duration, editorFns ...util.RequestEditorFn) *ResponseTimePredictor

func (*ResponseTimePredictor) Endpoint

func (p *ResponseTimePredictor) Endpoint(appName string) (string, error)

Endpoint constructs the API endpoint. {{.App}} will be replaced with appName.

func (*ResponseTimePredictor) Predict

func (p *ResponseTimePredictor) Predict(ctx context.Context, appName string, cpuUsage float64) (t float64, err error)

type ResponseTimePredictorTemplateData

type ResponseTimePredictorTemplateData struct {
	App string
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL