Skip to content

Releases: emdgroup/baybe

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

0.11.0

09 Sep 16:58
98a9383
Compare
Choose a tag to compare

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 a Posterior object
  • param_bounds_comp of SearchSpace, SubspaceDiscrete and SubspaceContinuous has
    been replaced with comp_rep_bounds, which returns a dataframe

Added

  • py.typed file to enable the use of type checkers on the user side
  • IndependentGaussianSurrogate base class for surrogate models providing independent
    Gaussian posteriors for all candidates (cannot be used for batch prediction)
  • comp_rep_columns property for Parameter, SearchSpace, SubspaceDiscrete
    and SubspaceContinuous 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 function
  • BetaPrior class
  • recommend now accepts the pending_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 and posterior methods to Campaign
  • 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 handles numpy arrays
  • MIN mode of NumericalTarget 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 and TaskParameter no longer incorrectly coerce a single
    string input to categories/tasks
  • farthest_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
    with BotorchRecommender

Removed

  • register_custom_architecture decorator
  • Scalar and DefaultScaler classes

Deprecations

  • The role of register_custom_architecture has been taken over by
    baybe.surrogates.base.SurrogateProtocol
  • BayesianRecommender.surrogate_model has been replaced with get_surrogate

Merged Pull Requests

New Contributors

Full Changelog: 0.10.0...0.11.0

0.10.0

02 Aug 18:56
4282f1c
Compare
Choose a tag to compare

What's Changed

Breaking Changes

  • Providing an explicit batch_size is now mandatory when asking for recommendations
  • RecommenderProtocol.recommend now accepts an optional Objective
  • RecommenderProtocol.recommend now expects training data to be provided as a single
    dataframe in experimental representation instead of two separate dataframes in
    computational representation
  • Parameter.is_numeric has been replaced with Parameter.is_numerical
  • DiscreteParameter.transform_rep_exp2comp has been replaced with
    DiscreteParameter.transform
  • filter_attributes has been replaced with match_attributes

Added

  • Surrogate base class now exposes a to_botorch method
  • SubspaceDiscrete.to_searchspace and SubspaceContinuous.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) and PSTD (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 callables
  • transform methods of SearchSpace, SubspaceDiscrete and SubspaceContinuous
    now take additional allow_missing and allow_extra keyword arguments
  • More details to the transfer learning user guide
  • Activated doctests
  • SubspaceDiscrete.from_parameter, SubspaceContinuous.from_parameter,
    SubspaceContinuous.from_product and SearchSpace.from_parameter
    convenience constructors
  • DiscreteParameter.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 and CompositeKernel 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 to Campaign 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 and BotorchRecommender are now specified via
    DiscreteSamplingMethod enum
  • Interval class now supports degenerate intervals containing only one element
  • add_fake_results now directly processes Target objects instead of a Campaign
  • path argument in plotting utility is now optional and defaults to Path(".")
  • 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 to qLogEI for improved
    numerical stability

Removed

Fixed

  • sequential flag of SequentialGreedyRecommender is now set to True
  • Serialization bug related to class layout of SKLearnClusteringRecommender
  • MetaRecommenders no longer trigger warnings about non-empty objectives or
    measurements when calling a NonPredictiveRecommender
  • 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 of fit_gpytorch_mll when a TaskParameter
    is present, which acts as regularization via early stopping during model fitting

Deprecations

  • SequentialGreedyRecommender class replaced with BotorchRecommender
  • 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 the transform methods of
    SearchSpace, SubspaceDiscrete and SubspaceContinuous is no longer possible.
    The dataframe must now be passed as positional argument.
  • The new allow_extra flag is automatically set to True in transform 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 to Campaign
  • batch_quantity argument
  • Passing allow_repeated_recommendations or allow_recommending_already_measured
    to MetaRecommender (or former Strategy)
  • *Strategy classes and baybe.strategies subpackage
  • Specifying MetaRecommender (or former Strategy) configs without type information

Merged Pull Requests

Read more

0.9.1

04 Jun 13:31
7b94314
Compare
Choose a tag to compare

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 and comp_df and
    SubSelectionCondition's selection related to floating point precision

Merged Pull Requests

Full Changelog: 0.9.0...0.9.1

0.9.0

21 May 18:54
3a67df4
Compare
Choose a tag to compare

What's Changed

Added

  • Class hierarchy for objectives
  • AdditiveKernel, LinearKernel, MaternKernel, PeriodicKernel,
    PiecewisePolynomialKernel, PolynomialKernel, ProductKernel, RBFKernel,
    RFFKernel, RQKernel, ScaleKernel classes
  • KernelFactory 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
    and SmoothedBoxPrior 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 to acquisition_function
  • User guide now explains the new objective classes
  • Telemetry deactivation warning is only shown to developers
  • torch, gpytorch and botorch 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 from Surrogate base class, GaussianProcessSurrogate and
    CustomONNXSurrogate
  • Dependency on requests package

Fixed

  • n_task_params now evaluates to 1 if task_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 of Objectives 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 and DesirabilityObjective
  • acquisition_function_cls constructor parameter for BayesianRecommender
  • VarUCB and qVarUCB acquisition functions

Expired Deprecations (from 0.6.*)

  • BayBE class
  • baybe.surrogate module
  • baybe.targets.Objective class
  • baybe.strategies.Strategy class

Merged Pull Requests

New Contributors

Full Changelog: 0.8.2...0.9.0