Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AskRequestV2 ¶
type AskRequestV2 struct {
Task string `json:"task"`
Complexity int `json:"complexity,omitempty"`
Resources *decision.ResourceEstimate `json:"resources,omitempty"`
}
AskRequestV2 is the request body for POST /v2/ask.
type AskResponseV2 ¶
type AskResponseV2 struct {
Allowed bool `json:"allowed"`
Reasons []string `json:"reasons,omitempty"`
PredictedState *decision.FutureState `json:"predicted,omitempty"`
Confidence float64 `json:"confidence"`
Strategy string `json:"strategy"`
Model string `json:"model"`
}
AskResponseV2 is the response for POST /v2/ask.
type Coefficients ¶
type Coefficients struct {
CPUA float64 `json:"cpu_a,omitempty"`
CPUB float64 `json:"cpu_b,omitempty"`
MemA float64 `json:"mem_a,omitempty"`
MemB float64 `json:"mem_b,omitempty"`
GPUA float64 `json:"gpu_a,omitempty"`
GPUB float64 `json:"gpu_b,omitempty"`
VRAMA float64 `json:"vram_a,omitempty"`
VRAMB float64 `json:"vram_b,omitempty"`
}
Coefficients holds regression coefficients.
type HealthResponse ¶
type HealthResponse struct {
Status string `json:"status"`
}
type InfoResponse ¶
type InjectMetricsRequest ¶
type InjectMetricsRequest struct {
CPU *float64 `json:"cpu,omitempty"` // CPU usage percent
Memory *float64 `json:"memory,omitempty"` // Memory usage percent
GPUUsage *float64 `json:"gpu_usage,omitempty"` // GPU usage percent
VRAMUsage *float64 `json:"vram_usage,omitempty"` // VRAM usage percent
GPUIndex int `json:"gpu_index,omitempty"` // Which GPU (default 0)
}
InjectMetricsRequest is the request body for POST /debug/inject-metrics.
type ModelStatsResponse ¶
type ModelStatsResponse struct {
ModelName string `json:"model_name"`
LearningType string `json:"learning_type"`
TotalObservations int64 `json:"total_observations"`
Tasks map[string]*TaskStatsV2 `json:"tasks"`
}
ModelStatsResponse is the response for GET /v2/model/stats.
type ReadyResponse ¶
ReadyResponse is the response for /ready endpoint.
type SchedulerStatsResponse ¶
type SchedulerStatsResponse struct {
Running bool `json:"running"`
Interval string `json:"interval"`
RetrainCount int64 `json:"retrain_count"`
LastRetrain string `json:"last_retrain,omitempty"`
LastError string `json:"last_error,omitempty"`
}
SchedulerStatsResponse is the response for GET /v2/scheduler/stats.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) DecisionManager ¶
DecisionManager returns the decision manager if available.
func (*Server) ReloadConfig ¶
ReloadConfig reloads configuration that can be changed at runtime. Note: host/port changes require restart.
func (*Server) SetDecisionComponents ¶
func (s *Server) SetDecisionComponents(v2 *V2Components)
SetDecisionComponents sets the new decision engine components.
type TaskStatsV2 ¶
type TaskStatsV2 struct {
Task string `json:"task"`
Count int64 `json:"count"`
AvgCPUDelta float64 `json:"avg_cpu_delta"`
AvgMemDelta float64 `json:"avg_mem_delta"`
AvgGPUDelta float64 `json:"avg_gpu_delta,omitempty"`
AvgVRAMDelta float64 `json:"avg_vram_delta,omitempty"`
Coefficients *Coefficients `json:"coefficients,omitempty"`
}
TaskStatsV2 is the stats for a single task in V2.
type V2Components ¶
type V2Components struct {
DecisionManager *decision.Manager
Scheduler *scheduler.Scheduler
Model model.PredictionModel
}
V2Components holds the new decision engine components.