util

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2020 License: Apache-2.0 Imports: 11 Imported by: 4

Documentation

Index

Constants

View Source
const (
	ExperimentCreatedReason              = "ExperimentCreated"
	ExperimentRunningReason              = "ExperimentRunning"
	ExperimentRestartingReason           = "ExperimentRestarting"
	ExperimentGoalReachedReason          = "ExperimentGoalReached"
	ExperimentMaxTrialsReachedReason     = "ExperimentMaxTrialsReached"
	ExperimentSuggestionEndReachedReason = "ExperimentSuggestionEndReached"
	ExperimentFailedReason               = "ExperimentFailed"
)

Variables

This section is empty.

Functions

func IsCompletedExperimentRestartable

func IsCompletedExperimentRestartable(instance *experimentsv1beta1.Experiment) bool

IsCompletedExperimentRestartable returns whether experiment is restartable or not Experiment is restartable only if it is in succeeded state by reaching max trials and ResumePolicy = LongRunning or ResumePolicy = FromVolume

func UpdateExperimentStatus

func UpdateExperimentStatus(collector *ExperimentsCollector, instance *experimentsv1beta1.Experiment, trials *trialsv1beta1.TrialList) error

UpdateExperimentStatus checks if objective goal is reached and updates Experiment status from current Trials

func UpdateExperimentStatusCondition

func UpdateExperimentStatusCondition(collector *ExperimentsCollector, instance *experimentsv1beta1.Experiment, isObjectiveGoalReached bool, getSuggestionDone bool)

UpdateExperimentStatusCondition updates the experiment status.

Types

type ExperimentsCollector

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

func NewExpsCollector

func NewExpsCollector(store cache.Cache, registerer prometheus.Registerer) *ExperimentsCollector

func (*ExperimentsCollector) Collect

func (m *ExperimentsCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface.

func (*ExperimentsCollector) Describe

func (m *ExperimentsCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements the prometheus.Collector interface.

func (*ExperimentsCollector) IncreaseExperimentsCreatedCount

func (c *ExperimentsCollector) IncreaseExperimentsCreatedCount(ns string)

func (*ExperimentsCollector) IncreaseExperimentsDeletedCount

func (c *ExperimentsCollector) IncreaseExperimentsDeletedCount(ns string)

func (*ExperimentsCollector) IncreaseExperimentsFailedCount

func (c *ExperimentsCollector) IncreaseExperimentsFailedCount(ns string)

func (*ExperimentsCollector) IncreaseExperimentsSucceededCount

func (c *ExperimentsCollector) IncreaseExperimentsSucceededCount(ns string)

Jump to

Keyboard shortcuts

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