settings

package
v1.0.0-rc.17 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const DeviceCeilings = "inference.modeld.ceilings"

DeviceCeilings is the per-pool memory ceiling setting: a JSON object mapping a memory pool id ("host" or an accelerator id the inventory reports) to the share of that pool's total bytes the model runtime may hold, 0 < share <= 1.

Variables

This section is empty.

Functions

func ParseDeviceCeilings

func ParseDeviceCeilings(raw string) (map[string]float64, error)

ParseDeviceCeilings decodes and validates a stored DeviceCeilings value. An empty value is the unset setting: no pool carries a ceiling.

func ValidateDeviceCeiling

func ValidateDeviceCeiling(poolID string, share float64) error

ValidateDeviceCeiling refuses a pool id outside the inventory's spelling and a share outside (0, 1].

Types

type Spec

type Spec struct {
	Key     string `json:"key"`
	Label   string `json:"label"`
	Meaning string `json:"meaning"`
	Changes string `json:"effect"`
	ReadBy  string `json:"read_by"`
	Env     string `json:"environment_variable"`
	Unset   string `json:"unset_behavior"`
}

Spec describes a setting independently of its storage and presentation.

func All

func All() []Spec

All returns the setting definitions sorted by public name.

func Lookup

func Lookup(key string) (Spec, bool)

Lookup reports the setting definition for a Modeld configuration key.

Jump to

Keyboard shortcuts

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