bayesian-optimization 3.2.1__tar.gz → 3.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: bayesian-optimization
3
- Version: 3.2.1
3
+ Version: 3.2.2
4
4
  Summary: Bayesian Optimization package
5
5
  Author: Fernando Nogueira
6
6
  Author-email: Fernando Nogueira <fmfnogueira@gmail.com>
@@ -12,7 +12,6 @@ from collections.abc import Iterable
12
12
  from os import PathLike
13
13
  from pathlib import Path
14
14
  from typing import TYPE_CHECKING, Any
15
- from warnings import warn
16
15
 
17
16
  import numpy as np
18
17
  from scipy.optimize import NonlinearConstraint
@@ -138,8 +137,6 @@ class BayesianOptimization:
138
137
  raise TypeError(msg)
139
138
  self._bounds_transformer.initialize(self._space)
140
139
 
141
- self._sorting_warning_already_shown = False # TODO: remove in future version
142
-
143
140
  # Initialize logger
144
141
  self.logger = ScreenLogger(verbose=self._verbose, is_constrained=self.is_constrained)
145
142
 
@@ -278,17 +275,6 @@ class BayesianOptimization:
278
275
  constraint_value: float or None
279
276
  Value of the constraint function at the observation, if any.
280
277
  """
281
- # TODO: remove in future version
282
- if isinstance(params, np.ndarray) and not self._sorting_warning_already_shown:
283
- msg = (
284
- "You're attempting to register an np.ndarray. In previous versions, the optimizer internally"
285
- " sorted parameters by key and expected any registered array to respect this order."
286
- " In the current and any future version the order as given by the pbounds dictionary will be"
287
- " used. If you wish to retain sorted parameters, please manually sort your pbounds"
288
- " dictionary before constructing the optimizer."
289
- )
290
- warn(msg, stacklevel=1)
291
- self._sorting_warning_already_shown = True
292
278
  self._space.register(params, target, constraint_value)
293
279
  self.logger.log_optimization_step(
294
280
  self._space.keys, self._space.res()[-1], self._space.params_config, self.max
@@ -308,18 +294,6 @@ class BayesianOptimization:
308
294
  If True, the optimizer will evaluate the points when calling
309
295
  maximize(). Otherwise it will evaluate it at the moment.
310
296
  """
311
- # TODO: remove in future version
312
- if isinstance(params, np.ndarray) and not self._sorting_warning_already_shown:
313
- msg = (
314
- "You're attempting to register an np.ndarray. In previous versions, the optimizer internally"
315
- " sorted parameters by key and expected any registered array to respect this order."
316
- " In the current and any future version the order as given by the pbounds dictionary will be"
317
- " used. If you wish to retain sorted parameters, please manually sort your pbounds"
318
- " dictionary before constructing the optimizer."
319
- )
320
- warn(msg, stacklevel=1)
321
- self._sorting_warning_already_shown = True
322
- params = self._space.array_to_params(params)
323
297
  if lazy:
324
298
  self._queue.append(params)
325
299
  else:
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "bayesian-optimization"
3
- version = "3.2.1"
3
+ version = "3.2.2"
4
4
  description = "Bayesian Optimization package"
5
5
  authors = [{ name = "Fernando Nogueira", email = "fmfnogueira@gmail.com" }]
6
6
  license = { file = "LICENSE" }