Documentation ¶
Index ¶
- Variables
- func AddPredictor(framework dl.FrameworkManifest, predictor predict.Predictor) error
- func GetPredictor(framework dl.FrameworkManifest) (predict.Predictor, error)
- func Partition(in []interface{}, partitionSize int) (out [][]interface{})
- func PredictorFrameworks() []dl.FrameworkManifest
- func Predictors() []string
- func UploadDir() (string, error)
- type Agent
- func (p *Agent) Close(ctx context.Context, req *dl.Predictor) (*dl.PredictorCloseResponse, error)
- func (p *Agent) Dataset(ctx context.Context, req *dl.DatasetRequest) (*dl.FeaturesResponse, error)
- func (p *Agent) DatasetStream(req *dl.DatasetRequest, svr dl.Predict_DatasetStreamServer) error
- func (p *Agent) FindFrameworkModel(ctx context.Context, req *dl.PredictorOpenRequest) (*dl.FrameworkManifest, *dl.ModelManifest, error)
- func (p *Agent) Images(ctx context.Context, req *dl.ImagesRequest) (*dl.FeaturesResponse, error)
- func (p *Agent) ImagesStream(req *dl.ImagesRequest, svr dl.Predict_ImagesStreamServer) error
- func (p *Agent) Open(ctx context.Context, req *dl.PredictorOpenRequest) (*dl.Predictor, error)
- func (b *Agent) PublishInPredictor(host, prefix string) error
- func (b *Agent) PublishInRegistery(prefix string) error
- func (p *Agent) RegisterManifests() (*grpc.Server, error)
- func (p *Agent) RegisterPredictor() (*grpc.Server, error)
- func (p *Agent) Reset(ctx context.Context, req *dl.ResetRequest) (*dl.ResetResponse, error)
- func (p *Agent) URLs(ctx context.Context, req *dl.URLsRequest) (*dl.FeaturesResponse, error)
- func (p *Agent) URLsStream(req *dl.URLsRequest, svr dl.Predict_URLsStreamServer) error
- type Option
- type Options
- type Registry
- func (c *Registry) FrameworkAgents(context.Context, *dl.FrameworkRequest) (*dl.Agents, error)
- func (c *Registry) FrameworkManifests(context.Context, *dl.FrameworkRequest) (*dl.FrameworkManifestsResponse, error)
- func (c *Registry) ModelAgents(context.Context, *dl.ModelRequest) (*dl.Agents, error)
- func (c *Registry) ModelManifests(context.Context, *dl.ModelRequest) (*dl.ModelManifestsResponse, error)
- func (b *Registry) PublishInPredictor(host, prefix string) error
- func (c *Registry) PublishInRegistery() error
Constants ¶
This section is empty.
Variables ¶
var (
DefaultChannelBuffer = 1000
)
Functions ¶
func AddPredictor ¶
func AddPredictor(framework dl.FrameworkManifest, predictor predict.Predictor) error
func GetPredictor ¶
func GetPredictor(framework dl.FrameworkManifest) (predict.Predictor, error)
func Partition ¶ added in v0.2.19
func Partition(in []interface{}, partitionSize int) (out [][]interface{})
func PredictorFrameworks ¶ added in v0.2.19
func PredictorFrameworks() []dl.FrameworkManifest
func Predictors ¶
func Predictors() []string
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
func (*Agent) Dataset ¶ added in v0.2.16
func (p *Agent) Dataset(ctx context.Context, req *dl.DatasetRequest) (*dl.FeaturesResponse, error)
Dataset method receives a single dataset and runs the predictor on all elements of the dataset. The result is a prediction feature list.
func (*Agent) DatasetStream ¶ added in v0.2.16
func (p *Agent) DatasetStream(req *dl.DatasetRequest, svr dl.Predict_DatasetStreamServer) error
Dataset method receives a single dataset and runs the predictor on all elements of the dataset. The result is a prediction feature stream.
func (*Agent) FindFrameworkModel ¶
func (p *Agent) FindFrameworkModel(ctx context.Context, req *dl.PredictorOpenRequest) (*dl.FrameworkManifest, *dl.ModelManifest, error)
func (*Agent) Images ¶ added in v0.2.16
func (p *Agent) Images(ctx context.Context, req *dl.ImagesRequest) (*dl.FeaturesResponse, error)
Image method receives a list base64 encoded images and runs the predictor on all the images. The result is a prediction feature list for each image.
func (*Agent) ImagesStream ¶ added in v0.2.16
func (p *Agent) ImagesStream(req *dl.ImagesRequest, svr dl.Predict_ImagesStreamServer) error
Image method receives a list base64 encoded images and runs the predictor on all the images. The result is a prediction feature stream for each image.
func (*Agent) Open ¶ added in v0.2.16
Opens a predictor and returns an id where the predictor is accessible. The id can be used to perform inference requests.
func (*Agent) PublishInPredictor ¶ added in v0.2.16
func (*Agent) PublishInRegistery ¶ added in v0.2.16
func (*Agent) Reset ¶ added in v0.2.16
func (p *Agent) Reset(ctx context.Context, req *dl.ResetRequest) (*dl.ResetResponse, error)
Clear method clears the internal cache of the predictors
func (*Agent) URLs ¶ added in v0.2.16
func (p *Agent) URLs(ctx context.Context, req *dl.URLsRequest) (*dl.FeaturesResponse, error)
Image method receives a stream of urls and runs the predictor on all the urls. The result is a prediction feature list for each url.
func (*Agent) URLsStream ¶ added in v0.2.16
func (p *Agent) URLsStream(req *dl.URLsRequest, svr dl.Predict_URLsStreamServer) error
Image method receives a stream of urls and runs the predictor on all the urls. The result is a prediction feature stream for each url.
type Option ¶
func WithPortString ¶ added in v0.2.16
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func (*Registry) FrameworkAgents ¶
func (*Registry) FrameworkManifests ¶
func (c *Registry) FrameworkManifests(context.Context, *dl.FrameworkRequest) (*dl.FrameworkManifestsResponse, error)
func (*Registry) ModelAgents ¶
func (*Registry) ModelManifests ¶
func (c *Registry) ModelManifests(context.Context, *dl.ModelRequest) (*dl.ModelManifestsResponse, error)