Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically generate debugging file #1690

Closed
valentinsulzer opened this issue Sep 24, 2021 · 4 comments
Closed

Automatically generate debugging file #1690

valentinsulzer opened this issue Sep 24, 2021 · 4 comments
Labels
difficulty: hard Will take several weeks priority: low No existing plans to resolve

Comments

@valentinsulzer
Copy link
Member

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)

@arunavabasucom
Copy link

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

@rtimms
Copy link
Contributor

rtimms commented Mar 14, 2022

This PR might be relevant

@valentinsulzer
Copy link
Member Author

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

@jaskiratsingh2000
Copy link

Is it still opened?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: hard Will take several weeks priority: low No existing plans to resolve
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants