validation

package
v2.1.7 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAssignments

func CheckAssignments(t *optimizev1beta2.Trial, exp *optimizev1beta2.Experiment) error

CheckAssignments ensures the trial assignments match the definitions on the experiment

func CheckConstraints

func CheckConstraints(constraints []experimentsv1alpha1.Constraint, baselines []experimentsv1alpha1.Assignment) error

CheckConstraints ensures the supplied baseline assignments are valid for a set of constraints.

func CheckDefinition

CheckDefinition will make sure the cluster and API experiment definitions are compatible

func CheckMetricBounds

func CheckMetricBounds(m *optimizev1beta2.Metric, v *optimizev1beta2.Value) error

CheckMetricBounds ensures the specified

func CheckParameterValue

func CheckParameterValue(p *optimizev1beta2.Parameter, v intstr.IntOrString) bool

CheckParameterValue ensures the supplied value in range for the parameter.

Types

type AssignmentError

type AssignmentError struct {
	// Parameter names for which the assignment is missing
	Unassigned []string
	// Parameter names for which there is no definition
	Undefined []string
	// Parameter names for which the assignment is out of bounds
	OutOfBounds []string
	// Parameter names for which multiple assignments exist
	Duplicated []string
}

AssignmentError is raised when trial assignments do not match the experiment parameter definitions

func (*AssignmentError) Error

func (e *AssignmentError) Error() string

Error returns a message describing the nature of the problems with the assignments

Jump to

Keyboard shortcuts

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