config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFileNotFound = errors.New("config file not found")

ErrFileNotFound is the expected error if config file is not found.

Functions

This section is empty.

Types

type Config

type Config struct {
	Model Model `yaml:"model"`
}

Config represents the application configuration

func NewConfig

func NewConfig(fs afero.Fs, filePath string) (*Config, error)

NewConfig loads the configuration from a YAML file.

fs is the filesystem interface, allowing for different storage backends. filePath is the config file's path.

If the config file is not found, it returns ErrFileNotFound. Otherwise it returns a Config pointer or an error if loading fails.

type Dependencies

type Dependencies struct {
	PythonRequirements string   `yaml:"python_requirements"`
	Os                 []string `yaml:"os"`
}

type Model

type Model struct {
	Owner            string       `yaml:"owner"`
	Name             string       `yaml:"name"`
	PredictionRunner string       `yaml:"prediction_runner"`
	Runtime          Runtime      `yaml:"runtime"`
	Dependencies     Dependencies `yaml:"dependencies"`
}

Model represents the Model configuration

type Runtime

type Runtime struct {
	Python string `yaml:"python"`
	CUDA   string `yaml:"cuda"`
}

Jump to

Keyboard shortcuts

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