PyBaMM icon indicating copy to clipboard operation
PyBaMM copied to clipboard

Automatically generate debugging file

Open valentinsulzer opened this issue 4 years ago • 3 comments

When running long experiments, it can be hard to debug if the simulation fails a long way in.

If the simulation fails, automatically generate a debugging file with all the information necessary to recreate the failing simulation in just one cycle:

  • model including options
  • experiment
  • parameter values
  • discretization
  • solver
  • starting solution

Could be saved to pybamm.settings.debug_filename which defaults to debug.txt (and add debug.txt to the gitignore)

valentinsulzer avatar Sep 24 '21 16:09 valentinsulzer

hey, @tinosulzer I would l like to work on this issue.😀

arunavabasucom avatar Mar 13 '22 15:03 arunavabasucom

This PR might be relevant

rtimms avatar Mar 14 '22 09:03 rtimms

The first step for this is to have a nice __repr__ for the various objects, which shows which arguments and kwargs were passed in, e.g. pybamm.lithium_ion.DFN(options={"thermal": "x-full"}) (not the whole options dict). scikit-learn does this pretty nicely, see https://github.com/scikit-learn/scikit-learn/blob/f71c0313142c4e5f2f35a0021c36075cf8dba611/sklearn/utils/_pprint.py

This is definitely not a simple first issue! But it doesn't require super in-depth knowledge of the code base at least

valentinsulzer avatar Mar 14 '22 14:03 valentinsulzer

Is it still opened?

jaskiratsingh2000 avatar Feb 20 '23 09:02 jaskiratsingh2000