baybe.constraints.validation.validate_constraints¶
- baybe.constraints.validation.validate_constraints(constraints: Collection[Constraint], parameters: Collection[Parameter])[source]¶
Assert that a given collection of constraints is valid.
- Raises:
ValueError – If there is more than one
baybe.constraints.discrete.DiscreteDependenciesConstraint
declared.ValueError – If any two continuous cardinality constraints have an overlapping parameter set.
ValueError – If any constraint contains an invalid parameter name.
ValueError – If any continuous constraint includes a discrete parameter.
ValueError – If any discrete constraint includes a continuous parameter.
ValueError – If any discrete constraint that is valid only for numerical discrete parameters includes non-numerical discrete parameters.
- Return type: