Skip to content

sunya-ch/kepler-estimator

 
 

Repository files navigation

Kepler Estimator

Kepler estimator is a client module to kepler model server running as a sidecar of Kepler exporter.

This python will serve a PowerReequest from model package in Kepler exporter as defined in estimator.go via unix domain socket /tmp/estimator.sock.

type PowerRequest struct {
    ModelName       string      `json:"model_name"`
    MetricNames     []string    `json:"metrics"`
    PodMetricValues [][]float32 `json:"values"`
    CorePower       []float32   `json:"core_power"`
    DRAMPower       []float32   `json:"dram_power"`
    UncorePower     []float32   `json:"uncore_power"`
    PkgPower        []float32   `json:"pkg_power"`
    GPUPower        []float32   `json:"gpu_power"`
    SelectFilter    string      `json:"filter"`
}

Patch estimator sidecar to Kepler DaemonSet

kubectl patch daemonset kepler-exporter --patch-file deploy/patch.yaml

Local test

  1. single process
python src/estimator_test.py
  1. server-client test
python src/estimator.py & \
until [ -e /tmp/estimator.sock ]; do sleep 1; done \
&& python src/estimator_client.py \
&& kill $(ps -eaf|grep "python src/estimator.py" -m 1|awk '{print $2}') 2> /dev/null

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.7%
  • Other 1.3%