Releases: emdgroup/baybe
Releases · emdgroup/baybe
0.14.1
What's Changed
Added
to_jsonandfrom_jsonmethods now also natively support (de)serialization to/from
files and file-like objects
Changed
- Instead of requiring already read string representations of json files,
.from_json
now also supports file paths as argument and will read the file itself from_jsonnow strictly expects the source as a positional argumentto_jsonnow acceptskwargsand passes them tojson.dumps
Fixed
- Crash in
simulate_experimentwhen calculating cumulative best values for
batch_size>1 Campaign.allow_*flags now properly take into account recommendation caching- The campaign recommendation cache is now properly invalidated during context changes
Merges Pull Requests
- Fix Numerical Test Failures by @Scienfitz in #639
- Fix cumulative best in simulation by @Scienfitz in #643
- Delete backtesting Transfer Learning example by @AVHopp in #647
- Make
allow_*flags work with caching by @AdrianSosic in #655 - Post-Release 0.14.0 Fixes by @Scienfitz in #646
- Make
.from_jsonAccept File Paths by @Scienfitz in #653 - Add generic parameters to
to_json()method to be funneled tojson.dumps()by @dasmy in #656 - Release 0.14.1 by @Scienfitz in #659
Full Changelog: 0.14.0...0.14.1
0.14.0
What's Changed
Added
transformationssubpackage- New
NumericalTargetinterface, including advanced machinery for defining and
manipulating target transformations based on the newTransformationclass hierarchy match_bellandmatch_triangularconvenience constructors toNumericalTarget
for reproducing the legacyMATCHmodesnormalized_rampconvenience constructor toNumericalTargetfor reproducing the
legacy behavior when imposing bounds onMIN/MAXtargetsnormalized_sigmoid,match_absolute,match_quadraticandmatch_power
convenience constructors toNumericalTargetenabling additional matching/normalizing
behaviors- Full support for accessing posterior information of
NumericalTarget, i.e. now
including settings consideredMATCHmode in the legacy interface, as well as targets
used inDesirabilityObjective as_pre_transformationflag toDesirabilityObjectivefor controlling whether the
desirability transformation is applied before or after model fittingsupports_partial_measurementsproperty toObjectiveis_normalizedproperty toNumericalTargetnegate,normalize,abs,clamp,log,expandpowermethods to
NumericalTargetfor easy creation of transformed targets from existing ones- Addition and multiplication dunder methods (for scalar values) to
NumericalTarget get_imagemethod toNumericalTargetfor computing the images of transformed
target value ranges- Support for non-normalized targets in
DesirabilityObjective Objective.to_botorchmethod for converting objectives to BoTorchqEHVIandqLogEHVIacquisition functions (in addition to their noisy variants)- Tests for migrating to new
NumericalTargetinterface - API diagram in user guide
MetadataandMeasurableMetadataclasses providing optional information for BayBE
objectsObjectivenow has ametadataattribute as well as adescriptionpropertyTargetandParameternow have ametadataattribute as well asdescriptionand
unitpropertiesFPSRecommendernow optionally uses the fpsample library (if installed) with fallback
to internal implementation. The use offpsamplecan be deactivated by setting the
environment variableBAYBE_USE_FPSAMPLEfarthest_point_samplingnow also supports a collection of integers for
initialization, using them for pre-selecting points- Benchmarks can now run in different modes, store detailed machine information, and
local usage got new file naming and execution options
Changed
- The behavior of
NumericalTargetis no longer defined via amode(i.e.MIN,
MAX,MATCHin legacy interface) but controlled using a minimization flag and
corresponding target transformations. This allows for more flexible target
definitions, makes invalid target configurations unrepresentable, and is in line with
the definition of mathematical optimization problems. Also, it avoids the need to
explicitly specify an irrelevant optimization direction in the context of active
learning. - By default,
DesirabilityObjectivenow fits separate models for each target, rather
than modeling only the scalarized desirability value (see new
DesirabilityObjective.as_pre_transformationflag). As a result, posterior
evaluations now return information for each target individually, instead of just for
the desirability value. - Objective transformations (both tensor and dataframe based) now always use the Torch
computation route, avoiding the need for duplicated transformation logic - Specifying bounds for
Intervalis now optional unstructure_baseandget_base_structure_hook(de-)serialization utilities
have been replaced withunstructure_with_typeandmake_base_structure_hook
Fixed
- It is no longer possible to use identical names between parameters and targets
- Random seed context is correctly set within benchmarks
- Measurement input validation now respects typical tolerances associated with floating
point representation inaccuracy - Exotic serialization issues with constraints and conditions arising from missing
converters for floats MetaRecommender's no longer expose their private attributes via the constructor
Removed
- Telemetry
- Option to specify reference values for
add_fake_measurements convert_boundsutility (since now equivalent toInterval.create)geom_meanutility
Deprecations
- Creating
NumericalTargets using amodeargument TargetModeandTargetTransformationenumslinear_transform,triangular_transformandbell_transformfunctions
Expired Deprecations (from 0.10.*)
SequentialGreedyRecommenderclassSubspaceContinuous.samples_randommethodSubspaceContinuous.samples_full_factorialmethoddataargument totransformmethod of search space classes- Automatically setting
allow_extra=Trueintransformmethods of search space
classes when left unspecified
Merged Pull Requests
- Redesign numerical targets and transformations by @AdrianSosic in #512
- Forbid Overlapping Target and Parameter Names in Campaign by @Scienfitz in #593
- Add API overview to user guide by @Hrovatin in #597
- Testing for redesigned targets by @AdrianSosic in #564
- Add flexible metadata system by @tobiasploetz in #580
- Addons enabled by target refactoring by @AdrianSosic in #573
- Fix NumericalTarget constructor calls by @AdrianSosic in #602
- Remove polars xfails by @Scienfitz in #606
- Modern targets for simulation package by @AdrianSosic in #608
- Add Paper Citation by @Scienfitz in #609
- Enable Scalable FPS via optional
fpsamplepackage by @Scienfitz in #601 - Composite transformations by @AdrianSosic in #599
- Desirability as pre-transformation by @AdrianSosic in #582
- Lockfile check via pre-commit by @AdrianSosic in #613
- Fix: Set random seed within benchmark by @Hrovatin in #576
- Use
importlib.metadataby @AdrianSosic in #617 - Disable telemetry by @AdrianSosic in #615
- Doc Fixes and Minor Improvements by @Scienfitz in #616
- Run all benchmarks on release by @fabianliebig in #614
- New docs for
NumericalTargetby @AdrianSosic in #584 - Fix Floating Point Tolerance in Validations by @Scienfitz in #604
- Feature/base tl regr benchmark by @kalama-ai in #619
- Bring back downloads badge by @AdrianSosic in #627
- Expire 0.10.* deprecations by @AdrianSosic in #589
- Harmonize
floatRelated Converters and Validators in Constraints and Conditions by @Scienfitz in #624 - Forbid Overlap in Target and Parameter Names by @Scienfitz in #623
- Move target negation to objective by @AdrianSosic in #628
- Refactor serialization workarounds by @AdrianSosic in #577
- Extend CLI capabilities of the benchmark models for extended local usage by @Hrovatin in #611
- Final target cleanup by @AdrianSosic in #630
- Laser tuning example by @AdrianSosic in #633
- Target Refactoring by @AdrianSosic in #636
- Release 0.14.0 by @AdrianSosic in #637
New Contributors
- @kalama-ai made their first contribution in #619
Full Changelog: 0.13.2...0.14.0
0.13.2
What's Changed
Changed
- Lockfiles are now generated using
uv lockand 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_breakflag tofarthest_point_samplingto toggle between
random or deterministic sampling for equidistant casesrandom_tie_breakandinitializationattributes toFPSRecommenderto
control sampling infarthest_point_sampling- Flag for toggling parallel computation in
simulate_scenarios - Additional transfer learning and synthetic benchmarks
- Utility
normalize_input_dtypesfor ensuring all input dataframe columns have the
expected dtypes CompositeSurrogatenow has a_posterior_compmethod similar toSurrogateSHAPInsight.explain_targetmethod for computing explanations for only a specific
target
Changed
CategoricalParameterandTaskParameternow also allow Boolean entries as
valuesandactive_valuesSubspaceDiscrete.from_dataframenow handles purely Boolean columns differently,
inferring aCategoricalParameterwithINTencoding for themSHAPInsight.explainnow returns a tuple of explanations that contains one
explanation for each surrogate model used by the (possibly multi-output) objectiveSHAPInsight.plotnow has the optionaltarget_indexargument, 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_matchand some.recommend
calls now operate on dtype-normalized copies of the input if it contained unexpected
dtypes for a parameter or targetscikit-learnandscipyare now lazy-loaded- Validity of optional
model_paramsattribute ofRandomForestSurrogate,
NGBoostSurrogateandBayesianLinearSurrogateis now checked via a hardcoded
TypedDictinstead of dynamically retrieved specifications, required for
lazy-loading related packages CustomONNXSurrogate.onnx_stris no longer validated before being used
Fixed
- Using
PosteriorStandardDeviationwithMINtargets 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_targetsdecorator 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
CategoricalParameterby @Scienfitz in #552 - Amend
SHAPInsightforCompositeSurrogateby @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
extrasgroup for installing all dependencies required for optional features- Support for NumPy 2.0+
ParetoObjectiveclass for Pareto optimization of multiple targets and corresponding
qNoisyExpectedHypervolumeImprovement/qLogNoisyExpectedHypervolumeImprovement/
qLogNParEGOacquisition functions- Composite surrogates now drop rows containing NaNs (separately for each target),
effectively enabling partial measurements SubstanceParameter,CustomDiscreteParameterandCategoricalParameternow also
support restricting the search space viaactive_values, whilevaluescontinue to
identify allowed measurement inputsCampaign.posterior_statsandSurrogate.posterior_statsas convenience methods for
providing statistical measures about the target predictions of a given set of
candidatesacquisition_valuesandjoint_acquisition_valueconvenience methods to
CampaignandBayesianRecommenderfor computing acquisition valuesCampaign.get_acquisition_functionandBayesianRecommender.get_acquisition_function
convenience methods for retrieving the underlying acquisition functionAcquisitionFunction.evaluateconvenience method for computing acquisition values
from candidates in experimental representationqPSTDacquisition functionBCUT2Dencoding forSubstanceParameterSHAPInsightnow supports thewaterfallplot type- Cardinality constraints sections to the user guide
ContinuousCardinalityConstraintis now compatible withBotorchRecommender- Attribute
max_n_subspacestoBotorchRecommender, allowing to control
optimization behavior in the presence of cardinality constraints Surrogate.replicatemethod for making single-target surrogate models multi-target
compatibleCompositeSurrogateclass for composing multi-target surrogates from single-target
surrogatesis_multi_outputattribute toObjectivesupports_multi_outputattribute/property toSurrogate/AcquisitionFunctionn_outputsproperty toObjective- Attribute
relative_thresholdand methodget_absolute_thresholdsto
ContinuousCardinalityConstraintfor handling inactivity ranges - Utilities
inactive_parameter_combinationsandn_inactive_parameter_combinations
to bothContinuousCardinalityConstraintandSubspaceContinuousfor iterating
over cardinality-constrained parameter sets - Utilities
activate_parameterandis_cardinality_fulfilledfor enforcing and
validating cardinality constraints - Utility
is_inactivefor determining if parameters are inactive - A
MinimumCardinalityViolatedWarningis 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,
SubspaceDiscretenow only includes parameter values
that are inactive_values - The default value for
sequential_continuousinBotorchRecommenderhas been
changed toTrue SHAPInsightnow allows explanation input that has additional columns compared to
the background data (will be ignored)- Acquisition function indicator
is_mchas been removed in favor of new indicators
supports_batchingandsupports_pending_experiments fuzzy_row_matchnow 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
benchmarksmodule now accepts a list of domains to be executed- Construction of BoTorch acquisition functions has been redesigned from ground up
ngboostis now an optional dependencysetuptools-scmis now an optional dependency, used for improved version inferencecreate_example_plots,to_stringandindenthave been relocated within utils
Fixed
- Incorrect optimization direction with
PSTDwith a single minimization target - Provide version fallback in case scm fails to infer version during installation
Removed
fuzzy_row_matchwill no longer warn about entries not matching to the search spacefuncydependencyscikit-learn-extradependency by integrating relevant code parts intobaybe
Expired Deprecations (from 0.9.*)
baybe.objectivenamespaceacquisition_function_clsconstructor parameter forBayesianRecommenderVarUCBandqVarUCBacquisition 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
measurementsandpending_experimentsby @Scienfitz in #456 - Negative
betavalues 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_matchby @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_valuesby @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_statsby @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
ngboostoptional by @AdrianSosic in #529 - Posterior Stats: Catch No Measurements Case by @Scienfitz in #536
- Make
scikit-learn-extraoptional by @AdrianSosic in #530 - Make
setuptools-scmoptional 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
SHAPInsightclass - Optional
insightsdependency group - Insights user guide
- Example for a traditional mixture
allow_missingandallow_extrakeyword arguments toObjective.transformadd_noise_to_perturb_degenerate_rowsutilitybenchmarkssubpackage for defining and running performance testsCampaign.toggle_discrete_candidatesto dynamically in-/exclude discrete candidatesfilter_dfutility for filtering dataframe contentarrays_to_dataframesdecorator to create lookups from array-based callablesDiscreteConstraint.get_validto conveniently access valid candidates- Functionality for persisting benchmarking results on S3 from a manual pipeline run
remain_switchedoption toTwoPhaseMetaRecommenderis_statefulclass variable toMetaRecommenderget_non_meta_recommendermethod toMetaRecommender
Changed
SubstanceParameterencodings are now computed exclusively with the
scikit-fingerprintspackage, 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
CustomDiscreteParameterdoes not allow duplicated rows indataanymore- De-/activating Polars via
BAYBE_DEACTIVATE_POLARSnow requires passing values
compatible withstrtobool - All arguments to
MetaRecommender.select_recommenderare now optional MetaRecommenders can now be composed of otherMetaRecommenders- For performance reasons, search space manipulation using
polarsis no longer
guaranteed to produce the same row order as the correspondingpandasoperations allow_repeated_recommendationshas been renamed to
allow_recommending_already_recommendedand is nowTrueby default
Fixed
- Rare bug arising from degenerate
SubstanceParameter.comp_dfrows that caused
wrong number of recommendations being returned ContinuousConstraints 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 qNIPVnot working with singleMINtargets- Passing a
TargetTransformationwithout passingboundswhen creating a
NumericalTargetnow raises an error - Crash when using
ContinuousCardinalityConstraintcaused by an unintended interplay
between constraints and dropped parameters yielding empty parameter sets - Minimizing a single
NumericalTargetwith specified bounds/transformation via
SingleTargetObjectiveno 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_wrapperutility for creating lookup callables
Deprecations
- Passing a dataframe via the
dataargument toObjective.transformis no longer
possible. The dataframe must now be passed as positional argument. - The new
allow_extraflag is automatically set toTrueinObjective.transform
when left unspecified get_transform_parametershas been replaced withget_transform_objects- Passing a dataframe via the
dataargument toTarget.transformis no longer
possible. The data must now be passed as a series as first positional argument. SubstanceEncodingvalueMORGAN_FP. As a replacement,ECFPwith 1024 bits and
radius of 4 can be used.SubstanceEncodingvalueRDKIT. As a replacement,RDKIT2DDESCRIPTORScan be used.- The
metadataattribute ofSubspaceDiscreteno longer exists. Metadata is now
exclusively handled by theCampaignclass. get_current_recommenderandget_next_recommenderofMetaRecommenderhave 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_quantitykeyword 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_dfbug by @Scienfitz in #399 - Basic benchmarking structure by @fabianliebig in #413
- Require truthy/falsy values for
BAYBE_DEACTIVATE_POLARSby @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 toCampaignby @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
protobufdependency issue, version pin was removed
Full Changelog: 0.11.2...0.11.3