Skip to content

Releases: emdgroup/baybe

0.13.2

09 Jul 12:25
5e9e3dc
Compare
Choose a tag to compare

What's Changed

Changed

  • Lockfiles are now generated using uv lock and consumed using uv sync

Fixed

  • The Python version specifier now also allows patch versions of Python 3.13

Merged Pull Requests

New Contributors

Full Changelog: 0.13.1...0.13.2

0.13.1

06 Jun 12:24
a56d418
Compare
Choose a tag to compare

What's Changed

Added

  • Support for Python 3.13
  • random_tie_break flag to farthest_point_sampling to toggle between
    random or deterministic sampling for equidistant cases
  • random_tie_break and initialization attributes to FPSRecommender to
    control sampling in farthest_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 to Surrogate
  • SHAPInsight.explain_target method for computing explanations for only a specific
    target

Changed

  • CategoricalParameter and TaskParameter now also allow Boolean entries as
    values and active_values
  • SubspaceDiscrete.from_dataframe now handles purely Boolean columns differently,
    inferring a CategoricalParameter with INT encoding for them
  • SHAPInsight.explain now returns a tuple of explanations that contains one
    explanation for each surrogate model used by the (possibly multi-output) objective
  • SHAPInsight.plot now has the optional target_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 target
  • scikit-learn and scipy are now lazy-loaded
  • Validity of optional model_params attribute of RandomForestSurrogate,
    NGBoostSurrogate and BayesianLinearSurrogate 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 with MIN 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

New Contributors

Full Changelog: 0.13.0...0.13.1

0.13.0

16 Apr 10:22
b1ac334
Compare
Choose a tag to compare

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 and CategoricalParameter now also
    support restricting the search space via active_values, while values continue to
    identify allowed measurement inputs
  • Campaign.posterior_stats and Surrogate.posterior_stats as convenience methods for
    providing statistical measures about the target predictions of a given set of
    candidates
  • acquisition_values and joint_acquisition_value convenience methods to
    Campaign and BayesianRecommender for computing acquisition values
  • Campaign.get_acquisition_function and BayesianRecommender.get_acquisition_function
    convenience methods for retrieving the underlying acquisition function
  • AcquisitionFunction.evaluate convenience method for computing acquisition values
    from candidates in experimental representation
  • qPSTD acquisition function
  • BCUT2D encoding for SubstanceParameter
  • SHAPInsight now supports the waterfall plot type
  • Cardinality constraints sections to the user guide
  • ContinuousCardinalityConstraint is now compatible with BotorchRecommender
  • Attribute max_n_subspaces to BotorchRecommender, allowing to control
    optimization behavior in the presence of cardinality constraints
  • Surrogate.replicate method for making single-target surrogate models multi-target
    compatible
  • CompositeSurrogate class for composing multi-target surrogates from single-target
    surrogates
  • is_multi_output attribute to Objective
  • supports_multi_output attribute/property to Surrogate/AcquisitionFunction
  • n_outputs property to Objective
  • Attribute relative_threshold and method get_absolute_thresholds to
    ContinuousCardinalityConstraint for handling inactivity ranges
  • Utilities inactive_parameter_combinations andn_inactive_parameter_combinations
    to both ContinuousCardinalityConstraintand SubspaceContinuous for iterating
    over cardinality-constrained parameter sets
  • Utilities activate_parameter and is_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 in active_values
  • The default value for sequential_continuous in BotorchRecommender has been
    changed to True
  • 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 and supports_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 dependency
  • setuptools-scm is now an optional dependency, used for improved version inference
  • create_example_plots, to_string and indent 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 space
  • funcy dependency
  • scikit-learn-extra dependency by integrating relevant code parts into baybe

Expired Deprecations (from 0.9.*)

  • baybe.objective namespace
  • acquisition_function_cls constructor parameter for BayesianRecommender
  • VarUCB and qVarUCB acquisition functions

Merged Pull Requests

New Contributors

Full Changelog: 0.12.2...0.13.0

0.12.2

31 Jan 12:20
daaf4d1
Compare
Choose a tag to compare

What's Changed

Changed

  • More robust settings for the GP fitting

Merged Pull Requests

Full Changelog: 0.12.1...0.12.2

0.12.1

29 Jan 14:55
fb6e7d8
Compare
Choose a tag to compare

Hotfix Release

Full Changelog: 0.12.0...0.12.1

0.12.0

28 Jan 16:41
ac805e8
Compare
Choose a tag to compare

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 and allow_extra keyword arguments to Objective.transform
  • add_noise_to_perturb_degenerate_rows utility
  • benchmarks subpackage for defining and running performance tests
  • Campaign.toggle_discrete_candidates to dynamically in-/exclude discrete candidates
  • filter_df utility for filtering dataframe content
  • arrays_to_dataframes decorator to create lookups from array-based callables
  • DiscreteConstraint.get_valid to conveniently access valid candidates
  • Functionality for persisting benchmarking results on S3 from a manual pipeline run
  • remain_switched option to TwoPhaseMetaRecommender
  • is_stateful class variable to MetaRecommender
  • get_non_meta_recommender method to MetaRecommender

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 in data anymore
  • De-/activating Polars via BAYBE_DEACTIVATE_POLARS now requires passing values
    compatible with strtobool
  • All arguments to MetaRecommender.select_recommender are now optional
  • MetaRecommenders can now be composed of other MetaRecommenders
  • For performance reasons, search space manipulation using polars is no longer
    guaranteed to produce the same row order as the corresponding pandas operations
  • allow_repeated_recommendations has been renamed to
    allow_recommending_already_recommended and is now True by default

Fixed

  • Rare bug arising from degenerate SubstanceParameter.comp_df rows 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
  • qNIPV not working with single MIN targets
  • Passing a TargetTransformation without passing bounds 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 to Objective.transform is no longer
    possible. The dataframe must now be passed as positional argument.
  • The new allow_extra flag is automatically set to True in Objective.transform
    when left unspecified
  • get_transform_parameters has been replaced with get_transform_objects
  • Passing a dataframe via the data argument to Target.transform is no longer
    possible. The data must now be passed as a series as first positional argument.
  • SubstanceEncoding value MORGAN_FP. As a replacement, ECFP with 1024 bits and
    radius of 4 can be used.
  • SubstanceEncoding value RDKIT. As a replacement, RDKIT2DDESCRIPTORS can be used.
  • The metadata attribute of SubspaceDiscrete no longer exists. Metadata is now
    exclusively handled by the Campaign class.
  • get_current_recommender and get_next_recommender of MetaRecommender 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 by Campaign.

Merged Pull Requests

New Contributors

Full Changelog: 0.11.2...0.12.0

0.11.4

27 Jan 20:42
Compare
Choose a tag to compare

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

06 Nov 14:23
Compare
Choose a tag to compare

Hotfix Release

Fixed

  • protobuf dependency issue, version pin was removed

Full Changelog: 0.11.2...0.11.3

0.11.2

11 Oct 15:12
5380bcd
Compare
Choose a tag to compare

What's Changed

Added

  • n_restarts and n_raw_samples keywords to configure continuous optimization
    behavior for BotorchRecommender
  • User guide for utilities

Changed

  • Utility add_fake_results renamed to add_fake_measurements
  • Utilities add_fake_measurements and add_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

Full Changelog: 0.11.1...0.11.2

0.11.1

01 Oct 11:55
0d20f62
Compare
Choose a tag to compare

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 and ContinuousLinearInequalityConstraint
    replaced by ContinuousLinearConstraint with the corresponding operator keyword

Merged Pull Requests

Full Changelog: 0.11.0...0.11.1