-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
ENH: integrate.solve_ivp
: add verbose
as optional argument to print time step info
#11815
base: main
Are you sure you want to change the base?
Conversation
@ma-sadeghi Please use |
@everlookneversee Do you know why the build is failing? |
@ma-sadeghi As you can see two of azure pipelines are cancelled after 60 minutes. I have no idea about that because i have no permission to azure pipeline details and re-running that. this issue happens sometimes in the other pull requests. @rgommers @ilayn Do you have any idea?! |
It's just Azure having a bad day, please just ignore the timeout. |
Thanks @ma-sadeghi. Many older solvers have this kind of feature, but I'm not 100% sure if we want to introduce it for new code. So I'll wait for a second opinion here. @nmayorov any thoughts? |
I think it will be useful -- being able to see that integration is at least progressing. I personally like running optimization routine with verbosity. I sort of introduced a format which is used in
I think the reasonable set of columns are Also there could be a simple termination report, like "Successful reached the end in n step And there are 3 levels of verbosity:
These are only suggestions to consider. |
There seemed to be some support here so I implemented @nmayorov's suggestions using formatting from Alternatively, we could add a callback is suggested in the original issue. |
What do you think, @tupui? Add |
I would say that one does not prevent the other if |
@Kai-Striega I saw your post to the list, so I thought I'd ask you to weigh in here. If you'd be willing to contribute a callback interface to |
integrate.solve_ivp
: add verbose as optional argument to print time step info
integrate.solve_ivp
: add verbose as optional argument to print time step infointegrate.solve_ivp
: add verbose
as optional argument to print time step info
Reference issue
Fixes #11799
What does this implement/fix?
This PR adds
verbose
as an optional argument tosolve_ivp
method. The motivation, as described in the issue, was that for large-enough problems,solve_ivp
takes a significant amount of time to complete and it feels like it's stuck.Additional information
This is a sample output of calling
solve_ivp
withverbose=True
: