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: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// KindName is the kind name of CR this controller controls
	KindName = "LifelongLearningJob"
	// Name is this controller name
	Name = "LifelongLearning"
)

Variables

Kind contains the schema.GroupVersionKind for this controller type.

Functions

func IsJobFinished

func IsJobFinished(j *sednav1.LifelongLearningJob) bool

func New

New creates a new LifelongLearningJob controller that keeps the relevant pods in sync with their corresponding LifelongLearningJob objects.

func NewJobCondition

func NewJobCondition(conditionType sednav1.LLJobStageConditionType, jobStage sednav1.LLJobStage) sednav1.LLJobCondition

Types

type ConditionData

type ConditionData 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"`
}

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

func (*ConditionData) GetInputModelURLs

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

func (*ConditionData) GetOutputModelURLs

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

func (ConditionData) Marshal

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

func (*ConditionData) Unmarshal

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

type Controller

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

Controller ensures that all LifelongLearningJob 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 Model

type Model = runtime.Model

Jump to

Keyboard shortcuts

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