bindable

package
v0.0.0-...-d9bce91 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

bindable is a wrapper around lukai that is gomobile/gobind compatible.

gobind is very restricted in what types can be used. Thus, this is a wrapper that uses byte arrays for types that can't be used. This isn't intended to be used directly, instead should be used via a language specific client wrapper.

See github.com/luk-ai/lukai for details of the functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetGCEvery

func SetGCEvery(seconds int)

SetGCEvery sets how often the examples garbage collector runs.

func SetMaxConcurrentTrainingJobs

func SetMaxConcurrentTrainingJobs(n int)

SetMaxConcurrentTrainingJobs sets the maximum number of training jobs that can be running. One ModelType will only ever train on one, but it's possible for multiple instances of ModelType to train multiple at the same time.

func SetMaxDiskUsage

func SetMaxDiskUsage(bytes int)

SetMaxDiskUsage sets how much disk can be used for examples.

func SetMaxFileDuration

func SetMaxFileDuration(seconds int)

SetMaxFileDuration sets the duration worth of examples that will be stored in one file. Specified in seconds.

func SetMaxFileRetention

func SetMaxFileRetention(seconds int)

SetMaxFileRetention sets the duration worth of examples that will be kept.

func SetMaxFileSize

func SetMaxFileSize(bytes int)

SetMaxFileSize sets how large each example file can be.

Types

type ModelType

type ModelType struct {
	*lukai.ModelType
}

func MakeModelType

func MakeModelType(domain, modelType, dataDir string) (*ModelType, error)

func (ModelType) Log

func (mt ModelType) Log(feedsBody, targetsBody []byte) error

Run is a wrapper around ModelType.Log that accepts bytes.

func (ModelType) Run

func (mt ModelType) Run(feedsBody, fetchesBody, targetsBody []byte) ([]byte, error)

Run is a wrapper around ModelType.Run that accepts bytes.

func (ModelType) StartTraining

func (mt ModelType) StartTraining() error

StartTraining is a wrapper around ModelType that doesn't take a context.

Jump to

Keyboard shortcuts

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