sidecar

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const MaxContainers = 500 // 256 pods and 2 containers per pod

Variables

This section is empty.

Functions

This section is empty.

Types

type ComponentPowerResponse

type ComponentPowerResponse struct {
	Powers  map[string][]float64 `json:"powers"`
	Message string               `json:"msg"`
}

ComponentPowerResponse defines a response of a map of component powers from Kepler Estimator

type EstimatorSidecar added in v0.5.4

type EstimatorSidecar struct {
	Socket       string
	OutputType   types.ModelOutputType
	EnergySource string
	TrainerName  string
	SelectFilter string

	FloatFeatureNames           []string
	SystemMetaDataFeatureNames  []string
	SystemMetaDataFeatureValues []string
	// contains filtered or unexported fields
}

EstimatorSidecar defines power estimator with Kepler Estimator sidecar

func (*EstimatorSidecar) AddContainerFeatureValues added in v0.5.4

func (c *EstimatorSidecar) AddContainerFeatureValues(x []float64)

AddContainerFeatureValues adds the the x for prediction, which are the explanatory variables (or the independent variable) of regression. EstimatorSidecar is trained off-line then we cannot Add training samples. We might implement it in the future. The EstimatorSidecar does not differentiate node or container power estimation, the difference will only be the amount of resource utilization

func (*EstimatorSidecar) AddDesiredOutValue added in v0.5.4

func (c *EstimatorSidecar) AddDesiredOutValue(y float64)

AddDesiredOutValue adds the the y, which is the response variable (or the dependent variable) of regression. EstimatorSidecar is trained off-line then we do not add Y for trainning. We might implement it in the future.

func (*EstimatorSidecar) AddNodeFeatureValues added in v0.5.4

func (c *EstimatorSidecar) AddNodeFeatureValues(x []float64)

AddNodeFeatureValues adds the the x for prediction, which is the variable used to calculate the ratio. EstimatorSidecar is not trained, then we cannot Add training samples, only samples for prediction. The EstimatorSidecar does not differentiate node or container power estimation, the difference will only be the amount of resource utilization

func (*EstimatorSidecar) GetComponentsPower added in v0.5.4

func (c *EstimatorSidecar) GetComponentsPower(isIdlePower bool) ([]source.NodeComponentsEnergy, error)

GetComponentsPower makes a request to Kepler Estimator EstimatorSidecar and return a list of total powers

func (*EstimatorSidecar) GetContainerFeatureNamesList added in v0.5.4

func (c *EstimatorSidecar) GetContainerFeatureNamesList() []string

GetContainerFeatureNamesList returns the list of float features that the model was configured to use The EstimatorSidecar does not differentiate node or container power estimation, the difference will only be the amount of resource utilization

func (*EstimatorSidecar) GetGPUPower added in v0.5.4

func (c *EstimatorSidecar) GetGPUPower(isIdlePower bool) ([]float64, error)

GetComponentsPower returns GPU Power in Watts associated to each each process/container/pod

func (*EstimatorSidecar) GetModelType added in v0.5.4

func (c *EstimatorSidecar) GetModelType() types.ModelType

GetModelType returns the model type

func (*EstimatorSidecar) GetNodeFeatureNamesList added in v0.5.4

func (c *EstimatorSidecar) GetNodeFeatureNamesList() []string

GetNodeFeatureNamesList returns the list of float features that the model was configured to use The EstimatorSidecar does not differentiate node or container power estimation, the difference will only be the amount of resource utilization

func (*EstimatorSidecar) GetPlatformPower added in v0.5.4

func (c *EstimatorSidecar) GetPlatformPower(isIdlePower bool) ([]float64, error)

GetPlatformPower makes a request to Kepler Estimator EstimatorSidecar and returns a list of total powers

func (*EstimatorSidecar) IsEnabled added in v0.5.4

func (c *EstimatorSidecar) IsEnabled() bool

IsEnabled returns true if the power model was trained and is active

func (*EstimatorSidecar) ResetSampleIdx added in v0.5.4

func (c *EstimatorSidecar) ResetSampleIdx()

ResetSampleIdx set the sample vector index to 0 to overwrite the old samples with new ones for trainning or prediction.

func (*EstimatorSidecar) Start added in v0.5.4

func (c *EstimatorSidecar) Start() error

Start returns nil if estimator is connected and has compatible power model

func (*EstimatorSidecar) Train added in v0.5.4

func (c *EstimatorSidecar) Train() error

Train triggers the regressiong fit after adding data points to create a new power model. EstimatorSidecar is trained in the Model Server then we cannot trigger the trainning. We might implement it in the future.

type PlatformPowerResponse added in v0.5.4

type PlatformPowerResponse struct {
	Powers  []float64 `json:"powers"`
	Message string    `json:"msg"`
}

PlatformPowerResponse defines a response of a list of total powers from Kepler Estimator

type PowerRequest

type PowerRequest struct {
	FloatFeatureNames           []string    `json:"metrics"`
	UsageValues                 [][]float64 `json:"values"`
	OutputType                  string      `json:"output_type"`
	EnergySource                string      `json:"source"`
	SystemMetaDataFeatureNames  []string    `json:"system_features"`
	SystemMetaDataFeatureValues []string    `json:"system_values"`
	TrainerName                 string      `json:"trainer_name"`
	SelectFilter                string      `json:"filter"`
}

PowerRequest defines a request to Kepler Estimator to get estimated powers

Jump to

Keyboard shortcuts

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