Skip to content

Commit

Permalink
resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jduerholt committed Nov 30, 2023
1 parent 5800d05 commit 5ce8d3e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions bofire/data_models/constraints/constraint.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ def jacobian(self, experiments: pd.DataFrame) -> pd.DataFrame:


class IntrapointConstraint(Constraint):
"""An intrapoint constraint describes required relationships within a candidate
when asking a strategy to return one or more candidates.
"""

type: str


Expand Down
4 changes: 3 additions & 1 deletion bofire/utils/torch_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ def get_interpoint_constraints(
domain: Domain, n_candidates: int
) -> List[Tuple[Tensor, Tensor, float]]:
"""Converts interpoint equality constraints to linear equality constraints,
that can be processed by botorch.
that can be processed by botorch. For more information, see the docstring
of `optimize_acqf` in botorch
(https://github.com/pytorch/botorch/blob/main/botorch/optim/optimize.py).
Args:
domain (Domain): Optimization problem definition.
Expand Down
2 changes: 1 addition & 1 deletion tests/bofire/data_models/specs/constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@
constraints.InterpointEqualityConstraint,
lambda: {
"feature": "f1",
"multiplicity": 1,
"multiplicity": 3,
},
)

0 comments on commit 5ce8d3e

Please sign in to comment.