Progress bar for VMC driver
Created by: orialb
This PR implements a progress bar that can be displayed during the VMC run, as discussed in https://github.com/netket/netket/issues/341. The progress bar is implemented using tqdm, which is now added as a dependency.
With this PR, one can call vmc_driver.run
with an extra argument show_progress
that is used to enable the progress bar. The options for show_progress
are:
-
None
(deafult) - progress bar is disabled. - list/tuple containing names of observables (e.g.
["Energy", "Sx"]
)- the observables' mean values will be displayed in the progress bar. Observables which were not added to the driver usingadd_obsrvable
will be ignored. -
True
/[]
or any other value not listed above- display the progress bar without any information about observables. (If wanted I could add a check that makes sure thatshow_progress
is eitherTrue
/[]
or the values above and throws an error otherwise).
I also added an argument show_progress_fmt
which allows controlling the formatting of the printed mean values (default is ".4f"). But if this is an overkill I can remove it.