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

info / ProgressBar for iterations #71

Open
aTrotier opened this issue Jan 18, 2024 · 1 comment
Open

info / ProgressBar for iterations #71

aTrotier opened this issue Jan 18, 2024 · 1 comment

Comments

@aTrotier
Copy link

Following discussion in : in MagneticResonanceImaging/MRIReco.jl#177

How can I add some way (progressBar or print) for the number of iterations and maybe other useful informations ?

I think we can pass a vector of callback to the solver, can we use that ?

@nHackel
Copy link
Member

nHackel commented Jan 18, 2024

Yes, this can be achieved with the callbacks. The callbacks are invoked with the current solver and the current iteration, so you could just print the iteration.

By inspecting the solver one could also look at the iterations or look into the iterations parameter of the MPIReco dict to do a progress bar or X/Y done printing:

solution = solve!(S, b, callbacks = (s, i) -> println("$i/$(s.iterations)"))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants