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 logging level for iteration #679

Merged
merged 2 commits into from
Apr 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 10 additions & 12 deletions openmmtools/multistate/multistatesampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ def equilibrate(self, n_iterations, mcmc_moves=None):
production_mcmc_moves = self._mcmc_moves
self._mcmc_moves = mcmc_moves
for iteration in range(1, 1 + n_iterations):
logger.debug("Equilibration iteration {}/{}".format(iteration, n_iterations))
logger.info("Equilibration iteration {}/{}".format(iteration, n_iterations))
timer.start('Equilibration Iteration')

# NOTE: Unlike run(), do NOT increment iteration counter.
Expand All @@ -703,14 +703,12 @@ def equilibrate(self, n_iterations, mcmc_moves=None):
estimated_finish_time = time.time() + estimated_time_remaining
# TODO: Transmit timing information

# Show timing statistics if debug level is activated.
if logger.isEnabledFor(logging.DEBUG):
logger.debug("Iteration took {:.3f}s.".format(iteration_time))
if estimated_time_remaining != float('inf'):
logger.debug("Estimated completion (of equilibration only) in {}, at {} (consuming total wall clock time {}).".format(
str(datetime.timedelta(seconds=estimated_time_remaining)),
time.ctime(estimated_finish_time),
str(datetime.timedelta(seconds=estimated_total_time))))
logger.info("Iteration took {:.3f}s.".format(iteration_time))
if estimated_time_remaining != float('inf'):
logger.info("Estimated completion (of equilibration only) in {}, at {} (consuming total wall clock time {}).".format(
str(datetime.timedelta(seconds=estimated_time_remaining)),
time.ctime(estimated_finish_time),
str(datetime.timedelta(seconds=estimated_total_time))))
timer.report_timing()

# Restore production MCMCMoves.
Expand Down Expand Up @@ -765,9 +763,9 @@ def run(self, n_iterations=None):
# Increment iteration counter.
self._iteration += 1

logger.debug('*' * 80)
logger.debug('Iteration {}/{}'.format(self._iteration, iteration_limit))
logger.debug('*' * 80)
logger.info('*' * 80)
logger.info('Iteration {}/{}'.format(self._iteration, iteration_limit))
logger.info('*' * 80)
timer.start('Iteration')

# Update thermodynamic states
Expand Down