diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f797351f..54711d9fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 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 ### Removed - `model_params` attribute from `Surrogate` base class, `GaussianProcessSurrogate` and diff --git a/baybe/simulation/core.py b/baybe/simulation/core.py index 7a456bbb6..04a8f9518 100644 --- a/baybe/simulation/core.py +++ b/baybe/simulation/core.py @@ -156,6 +156,15 @@ def simulate_experiment( ) break + # Temporary workaround to enable returning incomplete simulations + except Exception as ex: + warnings.warn( + f"An error has occurred during the simulation, " + f"therefore incomplete simulation results are returned. " + f"The error message was:\n{str(ex)}" + ) + break + n_experiments += len(measured) _look_up_target_values(measured, campaign, lookup, impute_mode)