You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to run some of the algorithms from pygmo a few times, and then produce runtime analysis graphs from those runs. For that, I use the information from .get_log().
However, I do not need the stdout output from .evolve() for all those runs, and I'd like to know if it is possible to suppress that while still getting access to the data from .get_log(). If I set_verbosity() to zero, I lose both std_out and get_log. I couldn't find anything that solved my problem in the documentation...
(I'd prefer not to suppress stdout at the terminal level, because I'm planning to use tqdm to show a progress bar as I go through the algorithm/problem pairs.)
Any ideas?
Thank you!
# Setup the run
algo = pg.algorithm(uda)
algo.set_verbosity(10)
pop = pg.population(prob, size = popsize)
pop = algo.evolve(pop)
# Extract the data
log = algo.extract(type(uda)).get_log()
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello!
I am trying to run some of the algorithms from pygmo a few times, and then produce runtime analysis graphs from those runs. For that, I use the information from
.get_log()
.However, I do not need the stdout output from
.evolve()
for all those runs, and I'd like to know if it is possible to suppress that while still getting access to the data from.get_log()
. If Iset_verbosity()
to zero, I lose bothstd_out
andget_log
. I couldn't find anything that solved my problem in the documentation...(I'd prefer not to suppress stdout at the terminal level, because I'm planning to use tqdm to show a progress bar as I go through the algorithm/problem pairs.)
Any ideas?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions