modules

package
v0.0.0-...-33a8802 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2021 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const MntPrefix = "^^^"

MntPrefix must be placed before all command line arguments if they represent a local directory or file which we want to mount to the image.

Variables

This section is empty.

Functions

func BuildModelImageWithMemory

func BuildModelImageWithMemory(baseImageName, memoryLocation, newImageTag string) (result io.ReadSeeker, err error)

BuildModelImageWithMemory takes a model image, copies the memory content to it and builds a new image from that.

func GetDockerClient

func GetDockerClient() *client.Client

GetDockerClient returns an instance of the Docker client.

func InferModuleProperties

func InferModuleProperties(sourcePath string) (id, name, description, schemaIn, schemaOut, configSpace string, err error)

InferModuleProperties takes a module available on the local docker instance and tries to infer its basic properties such as id, name and description.

func LoadImage

func LoadImage(imageFilePath string) (string, error)

LoadImage loads a Docker image from a tar file.

func RunContainerAndCollectOutput

func RunContainerAndCollectOutput(imageName string, entrypoint, command []string, gpuDevices []string) (io.ReadCloser, error)

RunContainerAndCollectOutput runs a given image name and returns the standard output reader.

func ValidateModel

func ValidateModel(modelImageName string, schemaStringIn, schemaStringOut, configSpace string, cleanup bool) (err error)

ValidateModel takes a model image and the input and output schema, generates a random input data set, runs train and predict on the model and verifies that the output data matches the output schema.

Types

type ConfigChoice

type ConfigChoice struct {
	Choices []ConfigElem
}

ConfigChoice is.

func (*ConfigChoice) Dump

func (c *ConfigChoice) Dump() interface{}

Dump is.

func (*ConfigChoice) Expand

func (c *ConfigChoice) Expand(rangeCount int) []ConfigElem

Expand is.

func (*ConfigChoice) Sample

func (c *ConfigChoice) Sample() ConfigElem

Sample is.

type ConfigConst

type ConfigConst struct {
	Value interface{}
}

ConfigConst is.

func (*ConfigConst) Dump

func (c *ConfigConst) Dump() interface{}

Dump is.

func (*ConfigConst) Expand

func (c *ConfigConst) Expand(rangeCount int) []ConfigElem

Expand is.

func (*ConfigConst) Sample

func (c *ConfigConst) Sample() ConfigElem

Sample is.

type ConfigElem

type ConfigElem interface {
	Sample() ConfigElem
	Expand(rangeCount int) []ConfigElem
	Dump() interface{}
}

ConfigElem is.

func LoadConfig

func LoadConfig(input interface{}) (ConfigElem, error)

LoadConfig is.

type ConfigFloat

type ConfigFloat struct {
	From, To float64
	Scale    string
}

ConfigFloat is.

func (*ConfigFloat) Dump

func (c *ConfigFloat) Dump() interface{}

Dump is.

func (*ConfigFloat) Expand

func (c *ConfigFloat) Expand(rangeCount int) []ConfigElem

Expand is.

func (*ConfigFloat) Sample

func (c *ConfigFloat) Sample() ConfigElem

Sample is.

type ConfigInt

type ConfigInt struct {
	From, To int
	Scale    string
}

ConfigInt is.

func (*ConfigInt) Dump

func (c *ConfigInt) Dump() interface{}

Dump is.

func (*ConfigInt) Expand

func (c *ConfigInt) Expand(rangeCount int) []ConfigElem

Expand is.

func (*ConfigInt) Sample

func (c *ConfigInt) Sample() ConfigElem

Sample is.

type ConfigMap

type ConfigMap map[string]ConfigElem

ConfigMap is.

func (*ConfigMap) Dump

func (c *ConfigMap) Dump() interface{}

Dump is.

func (*ConfigMap) Expand

func (c *ConfigMap) Expand(rangeCount int) []ConfigElem

Expand is.

func (*ConfigMap) Sample

func (c *ConfigMap) Sample() ConfigElem

Sample is.

Jump to

Keyboard shortcuts

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