lifelonglearning

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//KindName is kind of lifelong-learning-job resource
	KindName = "lifelonglearningjob"

	// TrainPhase is the train phase
	TrainPhase = "train"
	// EvalPhase is the eval phase
	EvalPhase = "eval"
	// DeployPhase is the deploy phase
	DeployPhase = "deploy"

	// TriggerReadyStatus is the ready status about trigger
	TriggerReadyStatus = "ready"
	// TriggerCompletedStatus is the completed status about trigger
	TriggerCompletedStatus = "completed"
)
View Source
const (
	// LLJobIterationIntervalSeconds is interval time of each iteration of job
	LLJobIterationIntervalSeconds = 10
	// LLHandlerDataIntervalSeconds is interval time of handling dataset
	LLHandlerDataIntervalSeconds = 10
	// LLLLEvalSamplesCapacity is capacity of eval samples
	LLEvalSamplesCapacity = 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job struct {
	sednav1.LifelongLearningJob
	Dataset   *dataset.Dataset
	Done      chan struct{}
	Storage   storage.Storage
	JobConfig *LLJobConfig
}

LifelongLearningJob defines config for lifelong-learning-job

type LLDataSamples

type LLDataSamples struct {
	Numbers            int
	TrainSamples       []string
	EvalVersionSamples [][]string
	EvalSamples        []string
}

LLDataSamples defines samples information

type LLJobConfig

type LLJobConfig struct {
	UniqueIdentifier string
	Version          int
	Phase            string
	WorkerStatus     string
	TrainTrigger     trigger.Base
	TriggerStatus    string
	TriggerTime      time.Time
	TrainDataURL     string
	EvalDataURL      string
	OutputDir        string
	OutputConfig     *LLOutputConfig
	DataSamples      *LLDataSamples
	TrainModel       *Model
	DeployModel      *Model
	EvalResult       *Model
	Lock             sync.Mutex
}

LLJobConfig defines config for lifelong-learning-job

type LLOutputConfig

type LLOutputConfig struct {
	SamplesOutput map[string]string
	TrainOutput   string
	EvalOutput    string
}

LLOutputConfig defines config for job output

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 LifelongLearningJob manager

type Model

type Model = clienttypes.Model

Jump to

Keyboard shortcuts

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