Skip to content
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
number of required models instead of the number of transform outputs

### Added
- `coefficients` attribute for `DiscreteSumConstraint`, enabling weighted sums. Follows
the same pattern as `ContinuousLinearConstraint.coefficients`
- `simplex_coefficients` keyword argument to `SubspaceDiscrete.from_simplex` for
weighted simplex sum constraints
- `Symmetry` concept for expressing symmetries of the optimization problem, including
Expand All @@ -43,14 +41,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `DiscreteRepetitionConstraint` for controlling value repetition across parameters
via `n_max_repetitions` (replaces `DiscreteNoLabelDuplicatesConstraint` and
`DiscreteLinkedParametersConstraint`)
- `DiscreteLinearConstraint` for (optionally weighted) sum constraints on discrete
parameters, supporting `coefficients` and mirroring `ContinuousLinearConstraint`'s
`operator`/`rhs`/`coefficients` interface (replaces `DiscreteSumConstraint`)

### Changed
- `BOTORCH` GP preset now includes `BetaPrior(2.5, 1.5)` for the task covariance
kernel in multi-task scenarios, matching BoTorch's `MultiTaskGP` defaults introduced
in version `0.18.0`
- The `BOTORCH` GP preset now requires BoTorch `>= 0.18.0` and raises an
`IncompatibilityError` if an older version is installed
- `DiscreteSumConstraint`, `ContinuousLinearConstraint`, and
- `DiscreteLinearConstraint`, `ContinuousLinearConstraint`, and
`SubspaceDiscrete.from_simplex` now forbid 0 as coefficients
- `SubspaceDiscrete.from_simplex` no longer requires non-negative parameter values
- Bumped polars to `>=0.20.8`
Expand All @@ -62,6 +63,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Discrete filtering constraints now uniformly define what is **kept** in the search
space; set `exclude=True` to invert and keep the complement instead
- Renamed `exclusion_constraints` example to `selection_constraints`
- `DiscreteProductConstraint` now uses `operator`/`rhs`/`tolerance` instead of
`condition`

### Deprecations
- `DiscreteExcludeConstraint` in favor of
Expand All @@ -71,6 +74,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `DiscreteLinkedParametersConstraint` in favor of
`DiscreteRepetitionConstraint(..., n_max_repetitions=len(parameters)-1,
exclude=True)`
- `DiscreteSumConstraint` in favor of `DiscreteLinearConstraint`
- `DiscreteProductConstraint(condition=ThresholdCondition(...))` in favor of
`DiscreteProductConstraint(operator=..., rhs=...)`

## [0.15.0] - 2026-06-11
### Breaking Changes
Expand Down
2 changes: 2 additions & 0 deletions baybe/constraints/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
DiscreteCustomConstraint,
DiscreteDependenciesConstraint,
DiscreteExcludeConstraint,
DiscreteLinearConstraint,
DiscreteLinkedParametersConstraint,
DiscreteNoLabelDuplicatesConstraint,
DiscretePermutationInvarianceConstraint,
Expand All @@ -35,6 +36,7 @@
"DiscreteCustomConstraint",
"DiscreteDependenciesConstraint",
"DiscreteExcludeConstraint",
"DiscreteLinearConstraint",
"DiscreteLinkedParametersConstraint",
"DiscreteNoLabelDuplicatesConstraint",
"DiscretePermutationInvarianceConstraint",
Expand Down
4 changes: 3 additions & 1 deletion baybe/constraints/continuous.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ class ContinuousLinearConstraint(ContinuousConstraint):
converter=lambda x: cattrs.structure(x, tuple[float, ...]),
validator=deep_iterable(member_validator=finite_float),
)
"""In-/equality coefficient for each entry in ``parameters``."""
"""The coefficients for the weighted sum, one per entry in ``parameters``.

Defaults to all-ones, i.e. an unweighted sum."""

rhs: float = field(default=0.0, converter=float, validator=finite_float)
"""Right-hand side value of the in-/equality."""
Expand Down
Loading