Releases: emdgroup/baybe
Releases · emdgroup/baybe
0.13.2
What's Changed
Changed
- Lockfiles are now generated using
uv lock
and consumed usinguv sync
Fixed
- The Python version specifier now also allows patch versions of Python 3.13
Merged Pull Requests
- Fix Python version specifier by @AdrianSosic in #587
- Uv lock by @AdrianSosic in #581
- Link badges to main branch by @AdrianSosic in #585
- xfail polars tests by @AdrianSosic in #586
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #588
- Release 0.13.2 by @AdrianSosic in #591
New Contributors
- @pre-commit-ci made their first contribution in #588
Full Changelog: 0.13.1...0.13.2
0.13.1
What's Changed
Added
- Support for Python 3.13
random_tie_break
flag tofarthest_point_sampling
to toggle between
random or deterministic sampling for equidistant casesrandom_tie_break
andinitialization
attributes toFPSRecommender
to
control sampling infarthest_point_sampling
- Flag for toggling parallel computation in
simulate_scenarios
- Additional transfer learning and synthetic benchmarks
- Utility
normalize_input_dtypes
for ensuring all input dataframe columns have the
expected dtypes CompositeSurrogate
now has a_posterior_comp
method similar toSurrogate
SHAPInsight.explain_target
method for computing explanations for only a specific
target
Changed
CategoricalParameter
andTaskParameter
now also allow Boolean entries as
values
andactive_values
SubspaceDiscrete.from_dataframe
now handles purely Boolean columns differently,
inferring aCategoricalParameter
withINT
encoding for themSHAPInsight.explain
now returns a tuple of explanations that contains one
explanation for each surrogate model used by the (possibly multi-output) objectiveSHAPInsight.plot
now has the optionaltarget_index
argument, enabling users to
select for which target they want to plot the shap assessment (default is the first
target)add_measurements
,update_measurements
,fuzzy_row_match
and some.recommend
calls now operate on dtype-normalized copies of the input if it contained unexpected
dtypes for a parameter or targetscikit-learn
andscipy
are now lazy-loaded- Validity of optional
model_params
attribute ofRandomForestSurrogate
,
NGBoostSurrogate
andBayesianLinearSurrogate
is now checked via a hardcoded
TypedDict
instead of dynamically retrieved specifications, required for
lazy-loading related packages CustomONNXSurrogate.onnx_str
is no longer validated before being used
Fixed
- Using
PosteriorStandardDeviation
withMIN
targets no longer results in
minimization of the acquisition function - Added missing garbage collection call to
pareto.py
, potentially solving
serialization issues in certain cases catch_constant_targets
decorator is now properly typed- Incorrect normalization of explanation shapes for
SHAPInsight
Removed
SHAPInsight.uses_shap_explainer
Merged Pull Requests
- Tie breaking for FPS by @StefanPSchmid in #519
- Enable parallel execution of scenarios by @monken in #543
- Add missing garbage collection call by @AdrianSosic in #551
- Fix guard clause by @AdrianSosic in #554
- Make import of deprecated ONNX function robust by @AVHopp in #555
- Add boolean flag for toggling parallel execution of scenarios by @AVHopp in #548
- Enable Python 3.13 by @AdrianSosic in #414
- Add missing decorator return type by @AdrianSosic in #559
- Add benchmarks by @Hrovatin in #491
- Adhere to new mypy rules by @AdrianSosic in #563
- Remove ONNX Workarounds by @Scienfitz in #562
- Lazy-load sklearn and scipy + adjust required model validations by @Scienfitz in #556
- Allow Booleans for
CategoricalParameter
by @Scienfitz in #552 - Amend
SHAPInsight
forCompositeSurrogate
by @Scienfitz in #558 - Release 0.13.1 by @Scienfitz in #565
- Fix required Python version by @AdrianSosic in #566
New Contributors
- @StefanPSchmid made their first contribution in #519
- @monken made their first contribution in #543
Full Changelog: 0.13.0...0.13.1
0.13.0
What's Changed
Added
extras
group for installing all dependencies required for optional features- Support for NumPy 2.0+
ParetoObjective
class for Pareto optimization of multiple targets and corresponding
qNoisyExpectedHypervolumeImprovement
/qLogNoisyExpectedHypervolumeImprovement
/
qLogNParEGO
acquisition functions- Composite surrogates now drop rows containing NaNs (separately for each target),
effectively enabling partial measurements SubstanceParameter
,CustomDiscreteParameter
andCategoricalParameter
now also
support restricting the search space viaactive_values
, whilevalues
continue to
identify allowed measurement inputsCampaign.posterior_stats
andSurrogate.posterior_stats
as convenience methods for
providing statistical measures about the target predictions of a given set of
candidatesacquisition_values
andjoint_acquisition_value
convenience methods to
Campaign
andBayesianRecommender
for computing acquisition valuesCampaign.get_acquisition_function
andBayesianRecommender.get_acquisition_function
convenience methods for retrieving the underlying acquisition functionAcquisitionFunction.evaluate
convenience method for computing acquisition values
from candidates in experimental representationqPSTD
acquisition functionBCUT2D
encoding forSubstanceParameter
SHAPInsight
now supports thewaterfall
plot type- Cardinality constraints sections to the user guide
ContinuousCardinalityConstraint
is now compatible withBotorchRecommender
- Attribute
max_n_subspaces
toBotorchRecommender
, allowing to control
optimization behavior in the presence of cardinality constraints Surrogate.replicate
method for making single-target surrogate models multi-target
compatibleCompositeSurrogate
class for composing multi-target surrogates from single-target
surrogatesis_multi_output
attribute toObjective
supports_multi_output
attribute/property toSurrogate
/AcquisitionFunction
n_outputs
property toObjective
- Attribute
relative_threshold
and methodget_absolute_thresholds
to
ContinuousCardinalityConstraint
for handling inactivity ranges - Utilities
inactive_parameter_combinations
andn_inactive_parameter_combinations
to bothContinuousCardinalityConstraint
andSubspaceContinuous
for iterating
over cardinality-constrained parameter sets - Utilities
activate_parameter
andis_cardinality_fulfilled
for enforcing and
validating cardinality constraints - Utility
is_inactive
for determining if parameters are inactive - A
MinimumCardinalityViolatedWarning
is triggered when minimum cardinality
constraints are violated - Stored benchmarking results now include the Python environment and version
Changed
- Targets are now allowed to contain NaN, deferring potential failure to attempted
recommendation instead of data ingestion - For label-like parameters,
SubspaceDiscrete
now only includes parameter values
that are inactive_values
- The default value for
sequential_continuous
inBotorchRecommender
has been
changed toTrue
SHAPInsight
now allows explanation input that has additional columns compared to
the background data (will be ignored)- Acquisition function indicator
is_mc
has been removed in favor of new indicators
supports_batching
andsupports_pending_experiments
fuzzy_row_match
now uses vectorized operations, resulting in a speedup of matching
measurements to the search space between 4x and 40x- Model scaling now uses the parameter bounds instead of the search space bounds
benchmarks
module now accepts a list of domains to be executed- Construction of BoTorch acquisition functions has been redesigned from ground up
ngboost
is now an optional dependencysetuptools-scm
is now an optional dependency, used for improved version inferencecreate_example_plots
,to_string
andindent
have been relocated within utils
Fixed
- Incorrect optimization direction with
PSTD
with a single minimization target - Provide version fallback in case scm fails to infer version during installation
Removed
fuzzy_row_match
will no longer warn about entries not matching to the search spacefuncy
dependencyscikit-learn-extra
dependency by integrating relevant code parts intobaybe
Expired Deprecations (from 0.9.*)
baybe.objective
namespaceacquisition_function_cls
constructor parameter forBayesianRecommender
VarUCB
andqVarUCB
acquisition functions
Merged Pull Requests
- Fix Substance Encodings by @Scienfitz in #474
- Add Python environment and version metadata to benchmark results by @fabianliebig in #476
- Serialize python env and version data by @fabianliebig in #478
- Refactor benchmark architecture by @AdrianSosic in #477
- Refactor ACQF indicators by @Scienfitz in #479
- XFail bugged test case by @Scienfitz in #481
- Fix SHAP Plot Tests by @Scienfitz in #486
- Rework validation for
measurements
andpending_experiments
by @Scienfitz in #456 - Negative
beta
values by @AdrianSosic in #488 - Minor SHAP improvements by @Scienfitz in #494
- Increase timeout for benchmark test to 1440 minutes (24 hours) by @fabianliebig in #498
- Add logging to indicate currently running benchmark and its runtime by @fabianliebig in #499
- Vectorize
fuzzy_row_match
by @Scienfitz in #489 - Disable pre-commit.ci autofixing by @AdrianSosic in #501
- Pareto optimization by @AdrianSosic in #475
- Botorch with cardinality constraint via sampling by @Waschenbacher in #301
- Fix Pareto example plot export by @AdrianSosic in #505
- Fix serialization errors on 3.12 by @AdrianSosic in #506
- User guide for cardinality constraints by @AdrianSosic in #496
- Generalize
active_values
by @Scienfitz in #495 - Pipeline benchmark parallelization by @fabianliebig in #502
- Xfail bugged SHAP plot tests by @Scienfitz in #510
- Fix converter typing by @AdrianSosic in #511
- Acquisition function builder by @AdrianSosic in #490
- Add
Campaign.posterior_stats
by @Scienfitz in #504 - Provide version fallback in case scm fails to infer version during installation by @dasmy in #524
- Fix lockfile creation for uv>=0.6.0 by @AdrianSosic in #527
- Drop funcy dependency by @AdrianSosic in #528
- Add qLogNParEGO by @Scienfitz in #532
- More hypervolume acquisition functions by @AdrianSosic in #507
- Make
ngboost
optional by @AdrianSosic in #529 - Posterior Stats: Catch No Measurements Case by @Scienfitz in #536
- Make
scikit-learn-extra
optional by @AdrianSosic in #530 - Make
setuptools-scm
optional by @AdrianSosic in #526 - Enable Pareto and MATCH by @Scienfitz in #537
- Acquisition utility method by @AdrianSosic in #509
- Remove xfail for fixed SHAP case by @Scienfitz in #540
- Expire 0.9.* deprecations by @AdrianSosic in #497
- Enable Partial Measurements by @Scienfitz in #514
- Integrate KMedoids by @Scienfitz in #538
- Bump dev tools versions by @AdrianSosic in #503
- Release 0.13.0 by @AdrianSosic in #541
New Contributors
Full Changelog: 0.12.2...0.13.0
0.12.2
What's Changed
Changed
- More robust settings for the GP fitting
Merged Pull Requests
- Improve GP Fit by @Scienfitz in #472
Full Changelog: 0.12.1...0.12.2
0.12.1
0.12.0
What's Changed
Breaking Changes
- Lookup callables for simulation are now expected to accept/return dataframes with
the corresponding parameter/target column labels
Added
- SHAP explanations via the new
SHAPInsight
class - Optional
insights
dependency group - Insights user guide
- Example for a traditional mixture
allow_missing
andallow_extra
keyword arguments toObjective.transform
add_noise_to_perturb_degenerate_rows
utilitybenchmarks
subpackage for defining and running performance testsCampaign.toggle_discrete_candidates
to dynamically in-/exclude discrete candidatesfilter_df
utility for filtering dataframe contentarrays_to_dataframes
decorator to create lookups from array-based callablesDiscreteConstraint.get_valid
to conveniently access valid candidates- Functionality for persisting benchmarking results on S3 from a manual pipeline run
remain_switched
option toTwoPhaseMetaRecommender
is_stateful
class variable toMetaRecommender
get_non_meta_recommender
method toMetaRecommender
Changed
SubstanceParameter
encodings are now computed exclusively with the
scikit-fingerprints
package, granting access to all fingerprints available therein- Example for slot-based mixtures has been revised and grouped together with the new
traditional mixture example - Memory caching is now non-verbose
CustomDiscreteParameter
does not allow duplicated rows indata
anymore- De-/activating Polars via
BAYBE_DEACTIVATE_POLARS
now requires passing values
compatible withstrtobool
- All arguments to
MetaRecommender.select_recommender
are now optional MetaRecommender
s can now be composed of otherMetaRecommender
s- For performance reasons, search space manipulation using
polars
is no longer
guaranteed to produce the same row order as the correspondingpandas
operations allow_repeated_recommendations
has been renamed to
allow_recommending_already_recommended
and is nowTrue
by default
Fixed
- Rare bug arising from degenerate
SubstanceParameter.comp_df
rows that caused
wrong number of recommendations being returned ContinuousConstraint
s can now be used in single point precision- Search spaces are now stateless, preventing unintended side effects that could lead to
incorrect candidate sets when reused in different optimization contexts qNIPV
not working with singleMIN
targets- Passing a
TargetTransformation
without passingbounds
when creating a
NumericalTarget
now raises an error - Crash when using
ContinuousCardinalityConstraint
caused by an unintended interplay
between constraints and dropped parameters yielding empty parameter sets - Minimizing a single
NumericalTarget
with specified bounds/transformation via
SingleTargetObjective
no longer erroneously maximizes it allow_*
flags are now context-aware, i.e. setting them in a context where they are
irrelevant now raises an error instead of passing silently
Removed
botorch_function_wrapper
utility for creating lookup callables
Deprecations
- Passing a dataframe via the
data
argument toObjective.transform
is no longer
possible. The dataframe must now be passed as positional argument. - The new
allow_extra
flag is automatically set toTrue
inObjective.transform
when left unspecified get_transform_parameters
has been replaced withget_transform_objects
- Passing a dataframe via the
data
argument toTarget.transform
is no longer
possible. The data must now be passed as a series as first positional argument. SubstanceEncoding
valueMORGAN_FP
. As a replacement,ECFP
with 1024 bits and
radius of 4 can be used.SubstanceEncoding
valueRDKIT
. As a replacement,RDKIT2DDESCRIPTORS
can be used.- The
metadata
attribute ofSubspaceDiscrete
no longer exists. Metadata is now
exclusively handled by theCampaign
class. get_current_recommender
andget_next_recommender
ofMetaRecommender
have become
obsolete and calling them is no longer possible- Passing
allow_*
flags to recommenders is no longer supported since the necessary
metadata required for the flags is no longer available at that level. The
functionality has been taken over byCampaign
.
Merged Pull Requests
- Fix math in CardinalityConstraint docstring by @AVHopp in #405
- Typing overrides by @AdrianSosic in #400
- Bump Streamlit Requirement by @Scienfitz in #407
- Refactor objective transform interface by @AdrianSosic in #398
- Add Polars installation issues to known_issues by @AVHopp in #404
- Refactor target transform interface by @AdrianSosic in #406
- Drop
batch_quantity
keyword by @AdrianSosic in #411 - Add downloads badge by @AdrianSosic in #418
- Unpin protobuf by @Scienfitz in #421
- Fix some typos by @AdrianSosic in #426
- Fix Asserts in Dependency Constraint Example by @Scienfitz in #422
- Rework Mixture Examples by @Scienfitz in #394
- Use correct precision in botorch wrapper by @AVHopp in #417
- Enable scikit-fingerprints by @Hrovatin in #364
- Fix rare degenerate
comp_df
bug by @Scienfitz in #399 - Basic benchmarking structure by @fabianliebig in #413
- Require truthy/falsy values for
BAYBE_DEACTIVATE_POLARS
by @AdrianSosic in #427 - Fix dtype in continuous comp rep by @AVHopp in #415
- Drop CI audit dependence by @AdrianSosic in #434
- Immutable searchspace by @AdrianSosic in #412
- Fix: qNIPV not working with single MIN target by @Scienfitz in #435
- Add manual benchmark workflow and S3 result persistence by @fabianliebig in #429
- Raise error when specifying transformation without bounds by @AVHopp in #451
- Fix empty constraints after dropping parameters by @AVHopp in #448
- Include robust check for extracting column names for fingerprints by @AVHopp in #447
- Correct typo in docs on acquisition functions by @Hrovatin in #442
- Refactor callable lookup mechanism by @AdrianSosic in #441
- Pin version of scipy to <1.15 by @AVHopp in #458
- Hotfix: Minimization with bounds properly minimize targets by @AVHopp in #462
- Insights module and SHAPInsight by @Alex6022 in #391
- Simplify and extend meta recommender logic by @AdrianSosic in #457
- Fix minimization of improvement-based MC acquisition functions by @AdrianSosic in #465
- Maintain row order after cross join by @AdrianSosic in #463
- Move
allow_*
flags toCampaign
by @AdrianSosic in #423 - Insights User Guide by @Scienfitz in #466
- Include 0.11.4 Hotfix Changes in main by @Scienfitz in #469
- Release 0.12.0 by @Scienfitz in #470
New Contributors
- @Hrovatin made their first contribution in #364
- @fabianliebig made their first contribution in #413
- @Alex6022 made their first contribution in #391
Full Changelog: 0.11.2...0.12.0
0.11.4
Hotfix Release
Changed
- Polars lazy streaming has been deactivated due to instabilities
Fixed
- Improvement-based Monte Carlo acquisition functions now use the correct
reference value for single-target minimization
Full Changelog: 0.11.3...0.11.4
0.11.3
Hotfix Release
Fixed
protobuf
dependency issue, version pin was removed
Full Changelog: 0.11.2...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