Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
357 changes: 176 additions & 181 deletions botorch/acquisition/input_constructors.py

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions botorch/acquisition/joint_entropy_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import warnings
from math import log, pi

from typing import Any, Optional
from typing import Optional

import torch
from botorch import settings
Expand Down Expand Up @@ -78,7 +78,6 @@ def __init__(
estimation_type: str = "LB",
maximize: bool = True,
num_samples: int = 64,
**kwargs: Any,
) -> None:
r"""Joint entropy search acquisition function.

Expand Down
2 changes: 0 additions & 2 deletions botorch/acquisition/knowledge_gradient.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ def __init__(
inner_sampler: Optional[MCSampler] = None,
X_pending: Optional[Tensor] = None,
current_value: Optional[Tensor] = None,
**kwargs: Any,
) -> None:
r"""q-Knowledge Gradient (one-shot optimization).

Expand Down Expand Up @@ -330,7 +329,6 @@ def __init__(
expand: Callable[[Tensor], Tensor] = lambda X: X,
valfunc_cls: Optional[Type[AcquisitionFunction]] = None,
valfunc_argfac: Optional[Callable[[Model], Dict[str, Any]]] = None,
**kwargs: Any,
) -> None:
r"""Multi-Fidelity q-Knowledge Gradient (one-shot optimization).

Expand Down
2 changes: 0 additions & 2 deletions botorch/acquisition/max_value_entropy_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,6 @@ def __init__(
maximize: bool = True,
X_pending: Optional[Tensor] = None,
train_inputs: Optional[Tensor] = None,
**kwargs: Any,
) -> None:
r"""Single-outcome max-value entropy search acquisition function.

Expand Down Expand Up @@ -697,7 +696,6 @@ def __init__(
cost_aware_utility: Optional[CostAwareUtility] = None,
project: Callable[[Tensor], Tensor] = lambda X: X,
expand: Callable[[Tensor], Tensor] = lambda X: X,
**kwargs: Any,
) -> None:
r"""Single-outcome max-value entropy search acquisition function.

Expand Down
8 changes: 4 additions & 4 deletions botorch/acquisition/monte_carlo.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from abc import ABC, abstractmethod
from copy import deepcopy
from functools import partial
from typing import Any, Callable, List, Optional, Protocol, Tuple, Union
from typing import Callable, List, Optional, Protocol, Tuple, Union

import torch
from botorch.acquisition.acquisition import AcquisitionFunction, MCSamplerMixin
Expand Down Expand Up @@ -351,7 +351,6 @@ def __init__(
X_pending: Optional[Tensor] = None,
constraints: Optional[List[Callable[[Tensor], Tensor]]] = None,
eta: Union[Tensor, float] = 1e-3,
**kwargs: Any,
) -> None:
r"""q-Expected Improvement.

Expand Down Expand Up @@ -434,7 +433,7 @@ def __init__(
cache_root: bool = True,
constraints: Optional[List[Callable[[Tensor], Tensor]]] = None,
eta: Union[Tensor, float] = 1e-3,
**kwargs: Any,
marginalize_dim: Optional[int] = None,
) -> None:
r"""q-Noisy Expected Improvement.

Expand Down Expand Up @@ -469,6 +468,7 @@ def __init__(
eta: Temperature parameter(s) governing the smoothness of the sigmoid
approximation to the constraint indicators. For more details, on this
parameter, see the docs of `compute_smoothed_feasibility_indicator`.
marginalize_dim: The dimension to marginalize over.

TODO: similar to qNEHVI, when we are using sequential greedy candidate
selection, we could incorporate pending points X_baseline and compute
Expand All @@ -491,7 +491,7 @@ def __init__(
X=X_baseline,
objective=objective,
posterior_transform=posterior_transform,
marginalize_dim=kwargs.get("marginalize_dim"),
marginalize_dim=marginalize_dim,
)
self.register_buffer("X_baseline", X_baseline)
# registering buffers for _get_samples_and_objectives in the next `if` block
Expand Down
6 changes: 3 additions & 3 deletions botorch/acquisition/multi_objective/monte_carlo.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from abc import ABC, abstractmethod
from copy import deepcopy
from itertools import combinations
from typing import Any, Callable, List, Optional, Union
from typing import Callable, List, Optional, Union

import torch
from botorch.acquisition.acquisition import AcquisitionFunction, MCSamplerMixin
Expand Down Expand Up @@ -373,7 +373,7 @@ def __init__(
max_iep: int = 0,
incremental_nehvi: bool = True,
cache_root: bool = True,
**kwargs: Any,
marginalize_dim: Optional[int] = None,
) -> None:
r"""q-Noisy Expected Hypervolume Improvement supporting m>=2 outcomes.

Expand Down Expand Up @@ -466,7 +466,7 @@ def __init__(
objective=objective,
constraints=constraints,
ref_point=ref_point,
marginalize_dim=kwargs.get("marginalize_dim"),
marginalize_dim=marginalize_dim,
)
self.register_buffer("ref_point", ref_point)
self.alpha = alpha
Expand Down
Loading