Documentation
¶
Index ¶
- Constants
- func BuildInferenceSettingsSourceTrace(commandBase *aisettings.InferenceSettings, parsed *values.Values, ...) (map[string]any, error)
- func BuildInferenceTraceParsedValues(cfg AppBootstrapConfig, parsed *values.Values) (*values.Values, error)
- func DefaultConfigFileMapper(rawConfig interface{}) (map[string]map[string]interface{}, error)
- func HandleInferenceDebugOutput(w io.Writer, cfg AppBootstrapConfig, parsed *values.Values, ...) (bool, error)
- func NewCLISelectionValues(cfg AppBootstrapConfig, input CLISelectionInput) (*values.Values, error)
- func NewEngineFromResolvedCLIEngineSettings(resolved *ResolvedCLIEngineSettings) (engine.Engine, error)
- func NewEngineFromResolvedCLIEngineSettingsWithFactory(engineFactory factory.EngineFactory, resolved *ResolvedCLIEngineSettings) (engine.Engine, error)
- func NewInferenceDebugSection() (schema.Section, error)
- func NewProfileSettingsSection(cfg AppBootstrapConfig) (schema.Section, error)
- func ResolveBaseInferenceSettings(cfg AppBootstrapConfig, parsed *values.Values) (*aisettings.InferenceSettings, []string, error)
- func ResolveCLIConfigFiles(cfg AppBootstrapConfig, parsed *values.Values) ([]string, error)
- func ResolveCLIConfigFilesForExplicit(cfg AppBootstrapConfig, explicit string) ([]string, error)
- func WriteInferenceSettingsDebugYAML(w io.Writer, resolved *ResolvedInferenceTrace, ...) error
- type AppBootstrapConfig
- type CLISelectionInput
- type ConfigPlanBuilder
- type InferenceDebugOutputOptions
- type InferenceDebugSettings
- type InferenceSettingSource
- type ProfileSettings
- type ResolvedCLIConfigFiles
- type ResolvedCLIEngineSettings
- type ResolvedCLIProfileRuntime
- type ResolvedInferenceTrace
- type ResolvedProfileRegistryChain
Constants ¶
View Source
const InferenceDebugSectionSlug = "debug-settings"
View Source
const ProfileSettingsSectionSlug = "profile-settings"
Variables ¶
This section is empty.
Functions ¶
func BuildInferenceSettingsSourceTrace ¶ added in v0.11.2
func BuildInferenceSettingsSourceTrace( commandBase *aisettings.InferenceSettings, parsed *values.Values, resolved *ResolvedInferenceTrace, ) (map[string]any, error)
func BuildInferenceTraceParsedValues ¶ added in v0.11.2
func DefaultConfigFileMapper ¶ added in v0.11.11
DefaultConfigFileMapper converts a raw YAML config (map[string]interface{}) into section-keyed layers (map[string]map[string]interface{}). Non-map top-level values are silently skipped.
func HandleInferenceDebugOutput ¶ added in v0.11.2
func HandleInferenceDebugOutput( w io.Writer, cfg AppBootstrapConfig, parsed *values.Values, settings InferenceDebugSettings, resolved *ResolvedInferenceTrace, opts InferenceDebugOutputOptions, ) (bool, error)
func NewCLISelectionValues ¶
func NewCLISelectionValues(cfg AppBootstrapConfig, input CLISelectionInput) (*values.Values, error)
func NewEngineFromResolvedCLIEngineSettings ¶
func NewEngineFromResolvedCLIEngineSettings( resolved *ResolvedCLIEngineSettings, ) (engine.Engine, error)
func NewEngineFromResolvedCLIEngineSettingsWithFactory ¶
func NewEngineFromResolvedCLIEngineSettingsWithFactory( engineFactory factory.EngineFactory, resolved *ResolvedCLIEngineSettings, ) (engine.Engine, error)
func NewInferenceDebugSection ¶ added in v0.11.2
func NewProfileSettingsSection ¶
func NewProfileSettingsSection(cfg AppBootstrapConfig) (schema.Section, error)
func ResolveBaseInferenceSettings ¶
func ResolveBaseInferenceSettings(cfg AppBootstrapConfig, parsed *values.Values) (*aisettings.InferenceSettings, []string, error)
func ResolveCLIConfigFiles ¶
func ResolveCLIConfigFiles(cfg AppBootstrapConfig, parsed *values.Values) ([]string, error)
func ResolveCLIConfigFilesForExplicit ¶
func ResolveCLIConfigFilesForExplicit(cfg AppBootstrapConfig, explicit string) ([]string, error)
func WriteInferenceSettingsDebugYAML ¶ added in v0.11.2
func WriteInferenceSettingsDebugYAML( w io.Writer, resolved *ResolvedInferenceTrace, opts InferenceDebugOutputOptions, ) error
Types ¶
type AppBootstrapConfig ¶
type AppBootstrapConfig struct {
AppName string
EnvPrefix string
ConfigFileMapper sources.ConfigFileMapper
NewProfileSection func() (schema.Section, error)
BuildBaseSections func() ([]schema.Section, error)
ConfigPlanBuilder ConfigPlanBuilder
}
func (AppBootstrapConfig) Validate ¶
func (c AppBootstrapConfig) Validate() error
type CLISelectionInput ¶
type ConfigPlanBuilder ¶ added in v0.11.10
type ConfigPlanBuilder func(parsed *values.Values) (*glazedconfig.Plan, error)
type InferenceDebugOutputOptions ¶ added in v0.11.2
type InferenceDebugOutputOptions struct {
CommandBase *aisettings.InferenceSettings
ParsedForTrace *values.Values
}
type InferenceDebugSettings ¶ added in v0.11.2
type InferenceDebugSettings struct {
PrintInferenceSettings bool `glazed:"print-inference-settings"`
}
type InferenceSettingSource ¶ added in v0.11.2
type ProfileSettings ¶
type ProfileSettings struct {
Profile string `glazed:"profile"`
ProfileRegistries []string `glazed:"profile-registries"`
}
func PrepareProfileSettingsForRuntime ¶ added in v0.11.12
func PrepareProfileSettingsForRuntime(cfg AppBootstrapConfig, settings ProfileSettings) ProfileSettings
func ResolveProfileSettings ¶
func ResolveProfileSettings(parsed *values.Values) ProfileSettings
type ResolvedCLIConfigFiles ¶ added in v0.11.10
type ResolvedCLIConfigFiles struct {
Paths []string
Files []glazedconfig.ResolvedConfigFile
Report *glazedconfig.PlanReport
}
func ResolveCLIConfigFilesResolved ¶ added in v0.11.10
func ResolveCLIConfigFilesResolved(cfg AppBootstrapConfig, parsed *values.Values) (*ResolvedCLIConfigFiles, error)
type ResolvedCLIEngineSettings ¶
type ResolvedCLIEngineSettings struct {
BaseInferenceSettings *aisettings.InferenceSettings
FinalInferenceSettings *aisettings.InferenceSettings
ProfileRuntime *ResolvedCLIProfileRuntime
ResolvedEngineProfile *gepprofiles.ResolvedEngineProfile
ConfigFiles []string
Close func()
}
func ResolveCLIEngineSettings ¶
func ResolveCLIEngineSettings( ctx context.Context, cfg AppBootstrapConfig, parsed *values.Values, ) (*ResolvedCLIEngineSettings, error)
func ResolveCLIEngineSettingsFromBase ¶
func ResolveCLIEngineSettingsFromBase( ctx context.Context, cfg AppBootstrapConfig, base *aisettings.InferenceSettings, parsed *values.Values, baseConfigFiles []string, ) (*ResolvedCLIEngineSettings, error)
type ResolvedCLIProfileRuntime ¶ added in v0.11.12
type ResolvedCLIProfileRuntime struct {
ProfileSettings ProfileSettings
ConfigFiles []string
ProfileRegistryChain *ResolvedProfileRegistryChain
Close func()
}
func ResolveCLIProfileRuntime ¶ added in v0.11.12
func ResolveCLIProfileRuntime( ctx context.Context, cfg AppBootstrapConfig, parsed *values.Values, ) (*ResolvedCLIProfileRuntime, error)
func ResolveCLIProfileRuntimeFromSettings ¶ added in v0.11.12
func ResolveCLIProfileRuntimeFromSettings( ctx context.Context, cfg AppBootstrapConfig, settings ProfileSettings, configFiles []string, ) (*ResolvedCLIProfileRuntime, error)
func (*ResolvedCLIProfileRuntime) Reader ¶ added in v0.11.12
func (r *ResolvedCLIProfileRuntime) Reader() gepprofiles.RegistryReader
func (*ResolvedCLIProfileRuntime) Registry ¶ added in v0.11.12
func (r *ResolvedCLIProfileRuntime) Registry() gepprofiles.Registry
type ResolvedInferenceTrace ¶ added in v0.11.12
type ResolvedInferenceTrace struct {
FinalInferenceSettings *aisettings.InferenceSettings
ResolvedEngineProfile *gepprofiles.ResolvedEngineProfile
}
type ResolvedProfileRegistryChain ¶ added in v0.11.10
type ResolvedProfileRegistryChain struct {
Registry gepprofiles.Registry
Reader gepprofiles.RegistryReader
DefaultRegistrySlug gepprofiles.RegistrySlug
DefaultProfileResolve gepprofiles.ResolveInput
Close func()
}
func ResolveProfileRegistryChain ¶ added in v0.11.10
func ResolveProfileRegistryChain(ctx context.Context, selection ProfileSettings) (*ResolvedProfileRegistryChain, error)
Click to show internal directories.
Click to hide internal directories.