Skip to content

Commit

Permalink
Botorch 0.9.5 (#317)
Browse files Browse the repository at this point in the history
* bump minimal botorch version to 0.9.5
  • Loading branch information
jduerholt authored Dec 11, 2023
1 parent 094b320 commit d4c5c49
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion bofire/data_models/features/continuous.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ def round(self, values: pd.Series) -> pd.Series:
allowed_values = np.arange(
self.lower_bound, self.upper_bound + self.stepsize, self.stepsize
)
idx = abs(values.values.reshape([3, 1]) - allowed_values).argmin(axis=1) # type: ignore
idx = abs(values.values.reshape([len(values), 1]) - allowed_values).argmin(
axis=1
)
return pd.Series(
data=self.lower_bound + idx * self.stepsize, index=values.index
)
Expand Down
2 changes: 1 addition & 1 deletion bofire/strategies/samplers/polytope.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def _ask(self, n: int) -> pd.DataFrame:
equality_constraints=combined_eqs if len(combined_eqs) > 0 else None,
n_burnin=self.n_burnin,
thinning=self.n_thinning,
seed=self.seed,
seed=self.rng.integers(1, 1000),
).squeeze(dim=0)

# check that the random generated candidates are not always the same
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
],
extras_require={
"optimization": [
"botorch>=0.9.4",
"botorch>=0.9.5",
"multiprocess",
"plotly",
"formulaic>=0.6.0",
Expand Down

0 comments on commit d4c5c49

Please sign in to comment.