Documentation ¶
Index ¶
- Constants
- Variables
- func IsJobFinished(j *sednav1.LifelongLearningJob) bool
- func New(cc *runtime.ControllerContext) (runtime.FeatureControllerI, error)
- func NewJobCondition(conditionType sednav1.LLJobStageConditionType, jobStage sednav1.LLJobStage) sednav1.LLJobCondition
- type ConditionData
- type Controller
- type Model
Constants ¶
View Source
const ( // KindName is the kind name of CR this controller controls KindName = "LifelongLearningJob" // Name is this controller name Name = "LifelongLearning" )
Variables ¶
View Source
var Kind = sednav1.SchemeGroupVersion.WithKind(KindName)
Kind contains the schema.GroupVersionKind for this controller type.
Functions ¶
func IsJobFinished ¶
func IsJobFinished(j *sednav1.LifelongLearningJob) bool
func New ¶
func New(cc *runtime.ControllerContext) (runtime.FeatureControllerI, error)
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
Click to show internal directories.
Click to hide internal directories.