Releases: emdgroup/baybe
Releases · emdgroup/baybe
0.11.3
0.11.2
What's Changed
Added
n_restarts
andn_raw_samples
keywords to configure continuous optimization
behavior forBotorchRecommender
- User guide for utilities
Changed
- Utility
add_fake_results
renamed toadd_fake_measurements
- Utilities
add_fake_measurements
andadd_parameter_noise
now also return the
dataframe they modified in-place
Fixed
- Leftover attrs-decorated classes are garbage collected before the subclass tree is
traversed, avoiding sporadic serialization problems
Merged Pull Requests
- Subclass garbage collection by @AdrianSosic in #397
- Update known_issues.md by @Scienfitz in #390
- Update CONTRIBUTING.md by @Scienfitz in #395
- Add Continuous Optimization Controls to BotorchRecommender by @Scienfitz in #389
- Add Explanation of some Utilities to User Guide by @Scienfitz in #392
- Release 0.11.2 by @Scienfitz in #401
Full Changelog: 0.11.1...0.11.2
0.11.1
What's Changed
Added
- Continuous linear constraints have been consolidated in the new
ContinuousLinearConstraint
class
Changed
get_surrogate
now also returns the model for transformed single targets or
desirability objectives
Fixed
- Unsafe name-based matching of columns in
get_comp_rep_parameter_indices
Deprecated
ContinuousLinearEqualityConstraint
andContinuousLinearInequalityConstraint
replaced byContinuousLinearConstraint
with the correspondingoperator
keyword
Merged Pull Requests
- Speedup Bernoulli Multi-Armed Bandit Example by @julianStreibel in #380
- Fix intersphinx link for torch by @AVHopp in #382
- Fix Name Matching for Retrieving Comp Rep Indices by @Scienfitz in #379
- Remove
get_surrogate
Restrictions by @Scienfitz in #386 - Consolidate Continuous Linear Constraints by @Scienfitz in #384
- Release 0.11.1 by @Scienfitz in #388
Full Changelog: 0.11.0...0.11.1
0.11.0
What's Changed
Breaking Changes
- The public methods of
Surrogate
models now operate on dataframes in experimental
representation instead of tensors in computational representation Surrogate.posterior
models now returns aPosterior
objectparam_bounds_comp
ofSearchSpace
,SubspaceDiscrete
andSubspaceContinuous
has
been replaced withcomp_rep_bounds
, which returns a dataframe
Added
py.typed
file to enable the use of type checkers on the user sideIndependentGaussianSurrogate
base class for surrogate models providing independent
Gaussian posteriors for all candidates (cannot be used for batch prediction)comp_rep_columns
property forParameter
,SearchSpace
,SubspaceDiscrete
andSubspaceContinuous
classes- New mechanisms for surrogate input/output scaling configurable per class
SurrogateProtocol
as an interface for user-defined surrogate architectures- Support for binary targets via
BinaryTarget
class - Support for bandit optimization via
BetaBernoulliMultiArmedBanditSurrogate
class - Bandit optimization example
qThompsonSampling
acquisition functionBetaPrior
classrecommend
now accepts thepending_experiments
argument, informing the algorithm
about points that were already selected for evaluation- Pure recommenders now have the
allow_recommending_pending_experiments
flag,
controlling whether pending experiments are excluded from candidates in purely
discrete search spaces get_surrogate
andposterior
methods toCampaign
tenacity
test dependency- Multi-version documentation
Changed
- The transition from experimental to computational representation no longer happens
in the recommender but in the surrogate - Fallback models created by
catch_constant_targets
are stored outside the surrogate to_tensor
now also handlesnumpy
arraysMIN
mode ofNumericalTarget
is now implemented via the acquisition function
instead of negating the computational representation- Search spaces now store their parameters in alphabetical order by name
- Improvement-based acquisition functions now consider the maximum posterior mean
instead of the maximum noisy measurement as reference value - Iteration tests now attempt up to 5 repeated executions if they fail due to numerical
reasons
Fixed
CategoricalParameter
andTaskParameter
no longer incorrectly coerce a single
string input to categories/tasksfarthest_point_sampling
no longer depends on the provided point order- Batch predictions for
RandomForestSurrogate
- Surrogates providing only marginal posterior information can no longer be used for
batch recommendation SearchSpace.from_dataframe
now creates a proper empty discrete subspace without
index when called with continuous parameters only- Metadata updates are now only triggered when a discrete subspace is present
- Unintended reordering of discrete search space parts for recommendations obtained
withBotorchRecommender
Removed
register_custom_architecture
decoratorScalar
andDefaultScaler
classes
Deprecations
- The role of
register_custom_architecture
has been taken over by
baybe.surrogates.base.SurrogateProtocol
BayesianRecommender.surrogate_model
has been replaced withget_surrogate
Merged Pull Requests
- Comp Rep Transition Point by @AdrianSosic in #278
- Surrogate Posteriors by @AdrianSosic in #309
- Surrogate scaling by @AdrianSosic in #315
- Surrogate interface by @AdrianSosic in #325
- Mypy for surrogates by @AdrianSosic in #337
- Add py.typed by @AdrianSosic in #342
- Lockfile for doc generation by @AdrianSosic in #323
- Fix parameter value conversion by @AdrianSosic in #259
- Improve FPS by @AdrianSosic in #336
- Refactor Surrogates by @AdrianSosic in #338
- Silence mypy type-abstract errors by @AdrianSosic in #354
- Hotfix: Remove python version in tox docs calls by @AVHopp in #351
- Fix local doc building by @AVHopp in #339
MIN
mode via acquisition function by @AdrianSosic in #340- Fix batch recommendation by @AdrianSosic in #348
- Remove token from publishing pipelines by @Scienfitz in #361
- Parameter permutation by @AdrianSosic in #341
- Add workflow permissions by @Scienfitz in #362
- Best_f from posterior means by @AdrianSosic in #350
- Fix
SubspaceDiscrete.from_dataframe
edge case by @AdrianSosic in #360 - Multi-Armed Bandit by @julianStreibel in #343
- Fix visuals in examples by @AVHopp in #347
- Enable Pending Points by @Scienfitz in #319
- Fix Recommendation Order for BotorchRecommender by @Scienfitz in #370
- Expose surrogate by @AdrianSosic in #355
- Add iteration test retries by @Scienfitz in #374
- Multi-version documentation by @AVHopp in #317
- Fix broken links to stable by @AVHopp in #377
- Release 0.11.0 by @Scienfitz in #376
New Contributors
- @julianStreibel made their first contribution in #343
Full Changelog: 0.10.0...0.11.0
0.10.0
What's Changed
Breaking Changes
- Providing an explicit
batch_size
is now mandatory when asking for recommendations RecommenderProtocol.recommend
now accepts an optionalObjective
RecommenderProtocol.recommend
now expects training data to be provided as a single
dataframe in experimental representation instead of two separate dataframes in
computational representationParameter.is_numeric
has been replaced withParameter.is_numerical
DiscreteParameter.transform_rep_exp2comp
has been replaced with
DiscreteParameter.transform
filter_attributes
has been replaced withmatch_attributes
Added
Surrogate
base class now exposes ato_botorch
methodSubspaceDiscrete.to_searchspace
andSubspaceContinuous.to_searchspace
convenience constructor- Validators for
Campaign
attributes _optional
subpackage for managing optional dependencies- New acquisition functions for active learning:
qNIPV
(negative integrated posterior
variance) andPSTD
(posterior standard deviation) - Acquisition function:
qKG
(knowledge gradient) - Abstract
ContinuousNonlinearConstraint
class - Abstract
CardinalityConstraint
class and
DiscreteCardinalityConstraint
/ContinuousCardinalityConstraint
subclasses - Uniform sampling mechanism for continuous spaces with cardinality constraints
register_hooks
utility enabling user-defined augmentation of arbitrary callablestransform
methods ofSearchSpace
,SubspaceDiscrete
andSubspaceContinuous
now take additionalallow_missing
andallow_extra
keyword arguments- More details to the transfer learning user guide
- Activated doctests
SubspaceDiscrete.from_parameter
,SubspaceContinuous.from_parameter
,
SubspaceContinuous.from_product
andSearchSpace.from_parameter
convenience constructorsDiscreteParameter.to_subspace
,ContinuousParameter.to_subspace
and
Parameter.to_searchspace
convenience constructors- Utilities for permutation and dependency data augmentation
- Validation and translation tests for kernels
BasicKernel
andCompositeKernel
base classes- Activated
pre-commit.ci
with auto-update - User guide for active learning
- Polars expressions for
DiscreteSumConstraint
,DiscreteProductConstraint
,
DiscreteExcludeConstraint
,DiscreteLinkedParametersConstraint
and
DiscreteNoLabelDuplicatesConstraint
- Discrete search space Cartesian product can be created lazily via Polars
- Examples demonstrating the
register_hooks
utility: basic registration mechanism,
monitoring the probability of improvement, and automatic campaign stopping
Changed
- Passing an
Objective
toCampaign
is now optional GaussianProcessSurrogate
models are no longer wrapped when cast to BoTorch- Restrict upper versions of main dependencies, motivated by major
numpy
release - Sampling methods in
qNIPV
andBotorchRecommender
are now specified via
DiscreteSamplingMethod
enum Interval
class now supports degenerate intervals containing only one elementadd_fake_results
now directly processesTarget
objects instead of aCampaign
path
argument in plotting utility is now optional and defaults toPath(".")
UnusedObjectWarning
by non-predictive recommenders is now ignored during simulations- The default kernel factory now avoids strong jumps by linearly interpolating between
two fixed low and high dimensional prior regimes - The previous default kernel factory has been renamed to
EDBOKernelFactory
and now
fully reflects the original logic - The default acquisition function has been changed from
qEI
toqLogEI
for improved
numerical stability
Removed
- Support for Python 3.9 removed due to new BoTorch requirements
and guidelines from Scientific Python - Linter
typos
for spellchecking
Fixed
sequential
flag ofSequentialGreedyRecommender
is now set toTrue
- Serialization bug related to class layout of
SKLearnClusteringRecommender
MetaRecommender
s no longer trigger warnings about non-empty objectives or
measurements when calling aNonPredictiveRecommender
- Bug introduced in 0.9.0 (PR #221, commit 3078f3), where arguments to
to_gpytorch
are not passed on to the GPyTorch kernels - Positive-valued kernel attributes are now correctly handled by validators
and hypothesis strategies - As a temporary workaround to compensate for missing
IndexKernel
priors,
fit_gpytorch_mll_torch
is used instead offit_gpytorch_mll
when aTaskParameter
is present, which acts as regularization via early stopping during model fitting
Deprecations
SequentialGreedyRecommender
class replaced withBotorchRecommender
SubspaceContinuous.samples_random
has been replaced with
SubspaceContinuous.sample_uniform
SubspaceContinuous.samples_full_factorial
has been replaced with
SubspaceContinuous.sample_from_full_factorial
- Passing a dataframe via the
data
argument to thetransform
methods of
SearchSpace
,SubspaceDiscrete
andSubspaceContinuous
is no longer possible.
The dataframe must now be passed as positional argument. - The new
allow_extra
flag is automatically set toTrue
intransform
methods
of search space classes when left unspecified
Expired Deprecations (from 0.7.*)
Interval.is_finite
property- Specifying target configs without type information
- Specifying parameters/constraints at the top level of a campaign configs
- Passing
numerical_measurements_must_be_within_tolerance
toCampaign
batch_quantity
argument- Passing
allow_repeated_recommendations
orallow_recommending_already_measured
toMetaRecommender
(or formerStrategy
) *Strategy
classes andbaybe.strategies
subpackage- Specifying
MetaRecommender
(or formerStrategy
) configs without type information
Merged Pull Requests
- Drop Python 3.9 by @AdrianSosic in #253
- Refactor recommender signature by @AdrianSosic in #220
- Python 3.10 syntax upgrade by @AdrianSosic in #255
- Fix changelog by @AdrianSosic in #261
- Refactor adapter model by @AdrianSosic in #260
- Deprecate SequentialGreedyRecommender by @AdrianSosic in #256
- Campaign validators by @AdrianSosic in #262
- Refactor optional imports by @AdrianSosic in #266
- Add upper version limits by @AdrianSosic in #271
- Add qNIPV acqf by @Scienfitz in #264
- Fix optional dependency flags by @AdrianSosic in #272
- Cardinality constraints for random recommender by @Waschenbacher in #243
- Register hook with the same signature by @RimRihana in #275
register_hooks
utility by @AdrianSosic in #276- Remove core test caching by @Scienfitz in #277
- Add CI dev branch triggers by @Scienfitz in #279
- Fix attrs incompatibility of pydoclint by @AdrianSosic in #282
- Replace
is_numeric
class attribute withis_numerical
by @AdrianSosic in #281 - Add discrete cardinality constraint by @Waschenbacher in #270
- Remove tox caching in Regular by @Scienfitz in #293
- Fix serialization and caching by @AdrianSosic in #298
- Refactor search space
transform
methods by @AdrianSosic in #289 - Fix MetaRecommender Warnings by @Scienfitz in #292
- Fix Deprecated Calls by @Scienfitz in #302
- Polars pipeline for discrete sum, product and exclusion constraints by @rjavadi in #252
- Update TL User Guide by @Scienfitz in #299
- Reorganize simulation lookup by @AdrianSosic in #265
- Change path from sys.path[0] to . by @AVHopp in #288
- Polars: Translate linked parameter and no label duplicate to polars by @rjavadi in #305
- Searchspace convenience constructors by @AdrianSosic in #303
- Add KnowledgeGradient ACQF by @Scienfitz in #308
- Augmentation Utilities by @Scienfitz in #290
- Fix kernel translation by @AdrianSosic in #311
- Upgrade dev tools by @AdrianSosic in #316
- Polars: from_product() implementation by @rjavadi in #306
- Add Active Learning Userguide by @Scienfitz in #273
- Ignore
UnusedObjectWarning
caused by nonpred recommenders in simulation by @Scienfitz in #313 - Temp Fix: Avoid Prior Jumps by @Scienfitz in #310
- Restore old MLL fit by @Scienfitz in #320
- Fix broken docstring links by @AVHopp in #324
- Custom Hooks: PI Example by @RimRihana in #287
- S...
0.9.1
What's Changed
Changed
- Discrete searchspace memory estimate is now natively represented in bytes
Fixed
- Non-GP surrogates not working with
deepcopy
and the simulation package due to
slotted base class - Datatype inconsistencies for various parameters'
values
andcomp_df
and
SubSelectionCondition
'sselection
related to floating point precision
Merged Pull Requests
- Fix wrong picture in README by @AVHopp in #248
- Fix surrogate slots by @Scienfitz in #251
- Refine MemorySize class by @Scienfitz in #249
- Separate tox commands for doc building by @AVHopp in #234
- Fix dtypes related to floating point precision by @Scienfitz in #254
- Release 0.9.1 by @AdrianSosic in #258
Full Changelog: 0.9.0...0.9.1
0.9.0
What's Changed
Added
- Class hierarchy for objectives
AdditiveKernel
,LinearKernel
,MaternKernel
,PeriodicKernel
,
PiecewisePolynomialKernel
,PolynomialKernel
,ProductKernel
,RBFKernel
,
RFFKernel
,RQKernel
,ScaleKernel
classesKernelFactory
protocol enabling context-dependent construction of kernels- Preset mechanism for
GaussianProcessSurrogate
hypothesis
strategies and roundtrip test for kernels, constraints, objectives,
priors and acquisition functions- New acquisition functions:
qSR
,qNEI
,LogEI
,qLogEI
,qLogNEI
GammaPrior
,HalfCauchyPrior
,NormalPrior
,HalfNormalPrior
,LogNormalPrior
andSmoothedBoxPrior
classes- Possibility to deserialize classes from optional class name abbreviations
- Basic deserialization tests using different class type specifiers
- Serialization user guide
- Environment variables user guide
- Utility for estimating memory requirements of discrete product search space
mypy
for search space and objectives
Changed
- Reorganized acquisition.py into
acquisition
subpackage - Reorganized simulation.py into
simulation
subpackage - Reorganized gaussian_process.py into
gaussian_process
subpackage - Acquisition functions are now their own objects
acquisition_function_cls
constructor parameter renamed toacquisition_function
- User guide now explains the new objective classes
- Telemetry deactivation warning is only shown to developers
torch
,gpytorch
andbotorch
are lazy-loaded for improved startup time- If an exception is encountered during simulation, incomplete results are returned
with a warning instead of passing through the uncaught exception - Environment variables
BAYBE_NUMPY_USE_SINGLE_PRECISION
and
BAYBE_TORCH_USE_SINGLE_PRECISION
to enforce single point precision usage
Removed
model_params
attribute fromSurrogate
base class,GaussianProcessSurrogate
and
CustomONNXSurrogate
- Dependency on
requests
package
Fixed
n_task_params
now evaluates to 1 iftask_idx == 0
- Simulation no longer fails in
ignore
mode when lookup dataframe contains duplicate
parameter configurations - Simulation no longer fails for targets in
MATCH
mode closest_element
now works for array-like input of all kinds- Structuring concrete subclasses no longer requires providing an explicit
type
field _target(s)
attributes ofObjectives
are now de-/serialized without leading
underscore to support user-friendly serialization strings- Telemetry does not execute any code if it was disabled
- Running simulations no longer alters the states of the global random number generators
Deprecations
- The former
baybe.objective.Objective
class has been replaced with
SingleTargetObjective
andDesirabilityObjective
acquisition_function_cls
constructor parameter forBayesianRecommender
VarUCB
andqVarUCB
acquisition functions
Expired Deprecations (from 0.6.*)
BayBE
classbaybe.surrogate
modulebaybe.targets.Objective
classbaybe.strategies.Strategy
class
Merged Pull Requests
- Emojification by @AdrianSosic in #189
- Lazy load DTypeFloatTorch by @rjavadi in #173
- Fix: n_task_params now evaluates to 1 if task_idx == 0 by @tobiasploetz in #187
- Acquisition package by @AdrianSosic in #190
- Mypy for search spaces by @AdrianSosic in #177
- Lazy load
torch
in surrogates by @rjavadi in #165 - Objective classes by @AdrianSosic in #188
- Correct simulate_scenarios to simulate_experiment in docs by @brandon-holt in #199
- Acquisition function classes by @AdrianSosic in #191
- Skeleton for kernels by @AVHopp in #196
- Hypothesis for objectives by @AdrianSosic in #197
- Fix lookup bug in simulation by @AdrianSosic in #202
- Hypothesis for constraints by @AdrianSosic in #178
- Drop
model_params
where unnecessary by @AdrianSosic in #204 - Hotfix for match mode simulation by @AdrianSosic in #208
- Update objective user guide by @AdrianSosic in #201
- Telemetry changes by @Scienfitz in #205
- Use tox-uv by @AdrianSosic in #182
torch
lazy loading by @AdrianSosic in #206- Create
simulation
subpackage by @AdrianSosic in #210 - New acquisition functions by @Scienfitz in #203
- Custom kernel priors by @AVHopp in #219
- Serialization user guide by @AdrianSosic in #216
- Refactor surrogates and decorators by @AdrianSosic in #209
- Enable force docs and tag selection by @Scienfitz in #230
- Simplification of doc building script by @AVHopp in #224
- More Priors by @Scienfitz in #225
- Fix telemetry execution by @Scienfitz in #237
- Enable returning incomplete simulation results by @AdrianSosic in #213
- Include custom
ScaleKernel
by @AVHopp in #221 - Relocate priors by @AdrianSosic in #238
- Enable single point precision via env vars by @Scienfitz in #226
- Refactor GP Surrogates by @AdrianSosic in #235
- Arithmetic kernels by @AdrianSosic in #241
- Ditch
requests
by @Scienfitz in #240 - Increate hypothesis deadline by @Scienfitz in #245
- Avoid altering RNG states by @AdrianSosic in #239
- User guide for environment variables by @Scienfitz in #227
- Minor README fixes by @AdrianSosic in #242
- Memory estimation utilities by @Scienfitz in #228
- Add more kernels by @Scienfitz in #244
- Release 0.9.0 by @AdrianSosic in #217
New Contributors
- @tobiasploetz made their first contribution in #187
- @brandon-holt made their first contribution in #199
Full Changelog: 0.8.2...0.9.0
0.8.2
What's Changed
Added
- Simulation user guide
- Example for transfer learning backtesting utility
pyupgrade
pre-commit hook- Better human readable
__str__
representation of objective and targets - Alternative dataframe deserialization from
pd.DataFrame
constructors
Changed
- More detailed and sophisticated search space user guide
- Support for Python 3.12
- Upgraded syntax to Python 3.9
- Bumped
onnx
version to fix vulnerability - Increased threshold for low-dimensional GP priors
- Replaced
fit_gpytorch_mll_torch
withfit_gpytorch_mll
Fixed
telemetry
dependency is no longer a group (enables Poetry installation)
Merged Pull Requests
- New search space userguide by @AVHopp in #170
- Simulation userguide by @AVHopp in #172
- Enable Python 3.12 by @Scienfitz in #153
- Python syntax upgrade by @AdrianSosic in #176
- Feature/pretty print objective by @RimRihana in #175
- Enable flexible dataframe de-serialization by @Scienfitz in #174
- Change order in sidebar by @AVHopp in #180
- Remove optional telemetry group by @AVHopp in #181
- Fix ONNX vulnerability by @AdrianSosic in #185
- Botorch settings by @AdrianSosic in #183
- Release 0.8.2 by @AdrianSosic in #186
Full Changelog: 0.8.1...0.8.2
0.8.1
What's Changed
Added
- Better human readable
__str__
representation of campaign - README now contains an example on substance encoding results
- Transfer learning user guide
from_simplex
constructor now also takes and applies optional constraints
Changed
- Full lookup backtesting example now tests different substance encodings
- Replaced unmaintained
mordred
dependency bymordredcommunity
SearchSpace
s now usendarray
instead ofTensor
Fixed
from_simplex
now efficiently validated inCampaign.validate_config
Merged Pull Requests
- Lazy loading torch - part 1 by @rjavadi in #119
- HOTFIX: Downgrade upload-pages-artifact action to v1 by @AVHopp in #158
- Feature/pretty print campaign by @RimRihana in #152
- Chemical Encoding Docs Update by @Scienfitz in #157
- First draft of Transfer Learning User Guide by @AVHopp in #140
- Extend
from_simplex
with constraints by @Scienfitz in #159 - Mordred dependency update by @Scienfitz in #163
- Migrate tensor to ndarray in searchspace by @rjavadi in #135
- Fix Regular Action by @Scienfitz in #167
- Add efficient
from_simplex
validation by @Scienfitz in #166 - Release 0.8.1 by @Scienfitz in #168
Full Changelog: 0.8.0...0.8.1
0.8.0
What's Changed
Changed
- BoTorch dependency bumped to
>=0.9.3
Removed
- Workaround for BoTorch hybrid recommender data type
- Support for Python 3.8
Merged Pull Requests
- Remove BoTorch Workaround (new) by @Scienfitz in #151
- Release 0.8.0 by @Scienfitz in #155
Full Changelog: 0.7.4...0.8.0