incrementallearning

package
v0.0.0-...-67dfe03 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Name is this controller name
	Name = "IncrementalLearning"

	// KindName is the kind name of CR this controller controls
	KindName = "IncrementalLearningJob"
)

Variables

Kind contains the schema.GroupVersionKind for this controller type.

Functions

func IsJobFinished

func IsJobFinished(j *sednav1.IncrementalLearningJob) bool

func New

New creates a new incremental learning job controller that keeps the relevant pods in sync with the corresponding IncrementalLearningJob objects.

func NewIncrementalJobCondition

func NewIncrementalJobCondition(conditionType sednav1.ILJobStageConditionType, jobStage sednav1.ILJobStage) sednav1.ILJobCondition

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller ensures that all IncrementalLearningJob objects have corresponding pods to run their configured workload.

func (*Controller) Run

func (c *Controller) Run(stopCh <-chan struct{})

Run starts the main goroutine responsible for watching and syncing jobs.

func (*Controller) SetDownstreamSendFunc

func (c *Controller) SetDownstreamSendFunc(f runtime.DownstreamSendFunc) error

func (*Controller) SetUpstreamHandler

func (c *Controller) SetUpstreamHandler(addFunc runtime.UpstreamHandlerAddFunc) error

type IncrementalCondData

type IncrementalCondData struct {
	Input *struct {
		// Only one model cases
		Model  *Model  `json:"model,omitempty"`
		Models []Model `json:"models,omitempty"`

		DataURL string `json:"dataURL,omitempty"`

		// the data samples reference will be stored into this URL.
		// The content of this url would be:
		// # the first uncomment line means the directory
		// s3://dataset/
		// mnist/0.jpg
		// mnist/1.jpg
		DataIndexURL string `json:"dataIndexURL,omitempty"`

		OutputDir string `json:"outputDir,omitempty"`
	} `json:"input,omitempty"`

	Output *struct {
		Model  *Model  `json:"model,omitempty"`
		Models []Model `json:"models,omitempty"`
	} `json:"output,omitempty"`
}

IncrementalCondData the data of this condition including the input/output to do the next step

func (*IncrementalCondData) GetInputModelURLs

func (cd *IncrementalCondData) GetInputModelURLs() []string

func (*IncrementalCondData) GetOutputModelURLs

func (cd *IncrementalCondData) GetOutputModelURLs() []string

func (IncrementalCondData) Marshal

func (cd IncrementalCondData) Marshal() ([]byte, error)

func (*IncrementalCondData) Unmarshal

func (cd *IncrementalCondData) Unmarshal(data []byte) error

type Model

type Model = runtime.Model

Jump to

Keyboard shortcuts

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