incrementallearning

package
v0.0.0-...-2984f7a Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: Apache-2.0 Imports: 25 Imported by: 1

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 incremental-learning-job resource
	KindName = "incrementallearningjob"

	// 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

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

DataSamples defines samples information

type Job

type Job struct {
	sednav1.IncrementalLearningJob
	JobConfig *JobConfig
}

IncrementalLearningJob defines config for incremental-learning-job

type JobConfig

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

JobConfig defines config for incremental-learning-job

type Manager

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

IncrementalLearningJob defines incremental-learning-job manager

func New

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

New creates a incremental-learning-job manager

func (*Manager) AddWorkerMessage

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

AddWorkerMessage adds worker messages

func (*Manager) Delete

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

Delete deletes incremental-learning-job config in db

func (*Manager) GetName

func (im *Manager) GetName() string

GetName returns name of the manager

func (*Manager) Insert

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

Insert inserts incremental-learning-job config to db

func (*Manager) Start

func (im *Manager) Start() error

Start starts incremental-learning-job manager

type Model

type Model = clienttypes.Model

type OutputConfig

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