lifelonglearning

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// JobIterationIntervalSeconds is interval time of each iteration of job
	JobIterationIntervalSeconds = 10
	// DatasetHandlerIntervalSeconds is interval time of handling dataset
	DatasetHandlerIntervalSeconds = 10
	// EvalSamplesCapacity is capacity of eval samples
	EvalSamplesCapacity = 5
	//KindName is kind of lifelong-learning-job resource
	KindName = "lifelonglearningjob"

	// TriggerReadyStatus is the ready status about trigger
	TriggerReadyStatus = "ready"
	// TriggerCompletedStatus is the completed status about trigger
	TriggerCompletedStatus = "completed"

	AnnotationsRoundsKey          = "sedna.io/rounds"
	AnnotationsNumberOfSamplesKey = "sedna.io/number-of-samples"
	AnnotationsDataFileOfEvalKey  = "sedna.io/data-file-of-eval"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DataSamples added in v0.5.0

type DataSamples struct {
	PreviousNumbers    int
	TrainSamples       []string
	EvalVersionSamples [][]string
	EvalSamples        []string
}

DataSamples defines samples information

type Job

type Job struct {
	sednav1.LifelongLearningJob
	JobConfig *JobConfig
}

LifelongLearningJob defines config for lifelong-learning-job

type JobConfig added in v0.5.0

type JobConfig struct {
	UniqueIdentifier    string
	Rounds              int
	TrainTrigger        trigger.Base
	TriggerTime         time.Time
	TrainTriggerStatus  string
	EvalTriggerStatus   string
	DeployTriggerStatus string
	TrainDataURL        string
	EvalDataURL         string
	OutputDir           string
	OutputConfig        *OutputConfig
	DataSamples         *DataSamples
	DeployModel         *Model
	Lock                sync.Mutex
	Dataset             *dataset.Dataset
	Storage             storage.Storage
	Done                chan struct{}
}

JobConfig defines config for lifelong-learning-job

type Manager

type Manager struct {
	Client                 clienttypes.ClientI
	WorkerMessageChannel   chan workertypes.MessageContent
	DatasetManager         *dataset.Manager
	LifelongLearningJobMap map[string]*Job
	VolumeMountPrefix      string
}

LifelongLearningJobManager defines lifelong-learning-job Manager

func New

func New(client clienttypes.ClientI, datasetManager *dataset.Manager, options *options.LocalControllerOptions) *Manager

New creates a lifelong-learning-job manager

func (*Manager) AddWorkerMessage

func (lm *Manager) AddWorkerMessage(message workertypes.MessageContent)

AddWorkerMessage adds worker messages

func (*Manager) Delete

func (lm *Manager) Delete(message *clienttypes.Message) error

Delete deletes lifelong-learning-job config in db

func (*Manager) GetName

func (lm *Manager) GetName() string

GetName returns name of the manager

func (*Manager) Insert

func (lm *Manager) Insert(message *clienttypes.Message) error

Insert inserts lifelong-learning-job config to db

func (*Manager) Start

func (lm *Manager) Start() error

Start starts lifelong-learning-job manager

type Model

type Model = clienttypes.Model

type OutputConfig added in v0.5.0

type OutputConfig struct {
	SamplesOutput map[string]string `json:"trainData"`
	TrainOutput   string            `json:"trainOutput"`
	EvalOutput    string            `json:"evalOutput"`
}

OutputConfig defines config for job output

Jump to

Keyboard shortcuts

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