agent

package
v0.2.15 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2017 License: NCSA Imports: 37 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPredictor

func AddPredictor(framework dl.FrameworkManifest, predictor predict.Predictor) error

func GetPredictor

func GetPredictor(framework dl.FrameworkManifest) (predict.Predictor, error)

func Predictors

func Predictors() []string

func UploadDir

func UploadDir() (string, error)

Types

type Agent

type Agent struct {
	Base
	// contains filtered or unexported fields
}

func New

func New(predictor predict.Predictor, opts ...Option) (*Agent, error)

func (*Agent) FindFrameworkModel

func (p *Agent) FindFrameworkModel(ctx context.Context, req *dl.PredictRequest) (*dl.FrameworkManifest, *dl.ModelManifest, error)

func (*Agent) Predict

func (p *Agent) Predict(ctx context.Context, req *dl.PredictRequest) (*dl.PredictResponse, error)

func (*Agent) ReadInput

func (p *Agent) ReadInput(ctx context.Context, req *dl.PredictRequest) (io.ReadCloser, error)

func (*Agent) RegisterManifests

func (p *Agent) RegisterManifests() (*grpc.Server, error)

func (*Agent) RegisterPredictor

func (p *Agent) RegisterPredictor() (*grpc.Server, error)

type Base

type Base struct {
	Framework dl.FrameworkManifest
}

func (*Base) PublishInPredictor

func (b *Base) PublishInPredictor(host, prefix string) error

func (*Base) PublishInRegistery

func (b *Base) PublishInRegistery(prefix string) error

type Option

type Option func(o *Options) *Options

func WithHost

func WithHost(host string) Option

func WithPort

func WithPort(port int) Option

type Options

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

func NewOptions

func NewOptions() (*Options, error)

type Registry

type Registry struct {
	Base
}

func (*Registry) FrameworkAgents

func (c *Registry) FrameworkAgents(context.Context, *dl.FrameworkRequest) (*dl.Agents, error)

func (*Registry) FrameworkManifests

func (*Registry) ModelAgents

func (c *Registry) ModelAgents(context.Context, *dl.ModelRequest) (*dl.Agents, error)

func (*Registry) ModelManifests

func (*Registry) PublishInRegistery

func (c *Registry) PublishInRegistery() error

Jump to

Keyboard shortcuts

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