Documentation ¶
Index ¶
- Constants
- func IsCompletedExperimentRestartable(instance *experimentsv1beta1.Experiment) bool
- func UpdateExperimentStatus(collector *ExperimentsCollector, instance *experimentsv1beta1.Experiment, ...) error
- func UpdateExperimentStatusCondition(collector *ExperimentsCollector, instance *experimentsv1beta1.Experiment, ...)
- type ExperimentsCollector
- func (m *ExperimentsCollector) Collect(ch chan<- prometheus.Metric)
- func (m *ExperimentsCollector) Describe(ch chan<- *prometheus.Desc)
- func (c *ExperimentsCollector) IncreaseExperimentsCreatedCount(ns string)
- func (c *ExperimentsCollector) IncreaseExperimentsDeletedCount(ns string)
- func (c *ExperimentsCollector) IncreaseExperimentsFailedCount(ns string)
- func (c *ExperimentsCollector) IncreaseExperimentsSucceededCount(ns string)
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)
Click to show internal directories.
Click to hide internal directories.