paramm-team / pybamm-param

Parameter optimisation for PyBaMM.
BSD 3-Clause "New" or "Revised" License
38 stars 8 forks source link

Incorporate `callback` function to handle exceptions in objective functions #41

Open brosaplanella opened 1 year ago

brosaplanella commented 1 year ago

At the moment, if an evaluation of the objective function crashes, the whole optimiser crashes. This is a problem especially with global optimisers such as DifferentialEvolution when they sweep a large parameter space. Adding a callback function to the optimisers would allow us to handle these exceptions.

We need to decide on how to implement them, but in any case we should let the users implement their own if they choose so.

PipGrylls commented 12 months ago

Is this still a problem and if so can you provide an example

brosaplanella commented 12 months ago

Let's hold it for now, as this problem has not surfaced for a while so we don't have a specific example to use.