predict

package
v0.0.72 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HealthcheckResponse added in v0.0.32

type HealthcheckResponse struct {
	Status string `json:"status"`
}

type HelpResponse

type HelpResponse struct {
	Arguments map[string]*config.RunArgument `json:"arguments"`
}

type Input

type Input struct {
	String *string
	File   *string
}

type Inputs

type Inputs map[string]Input

func NewInputs

func NewInputs(keyVals map[string]string) Inputs

func NewInputsWithBaseDir

func NewInputsWithBaseDir(keyVals map[string]string, baseDir string) Inputs

type Predictor

type Predictor struct {
	// contains filtered or unexported fields
}

func NewPredictor

func NewPredictor(runOptions docker.RunOptions) Predictor

func (*Predictor) GetSchema

func (p *Predictor) GetSchema() (*openapi3.T, error)

func (*Predictor) Predict

func (p *Predictor) Predict(inputs Inputs) (*Response, error)

func (*Predictor) Start

func (p *Predictor) Start(logsWriter io.Writer) error

func (*Predictor) Stop

func (p *Predictor) Stop() error

type Request

type Request struct {
	// TODO: could this be Inputs?
	Input map[string]string `json:"input"`
}

type Response

type Response struct {
	Status status       `json:"status"`
	Output *interface{} `json:"output"`
	Error  string       `json:"error"`
}

type ValidationErrorResponse

type ValidationErrorResponse struct {
	Detail []struct {
		Location []string `json:"loc"`
		Message  string   `json:"msg"`
		Type     string   `json:"type"`
	} `json:"detail"`
}

Jump to

Keyboard shortcuts

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