Skip to content

Conversation

@jakobj
Copy link
Owner

@jakobj jakobj commented Jul 2, 2018

This PR add simple logging to snes. In addition to the screen output a log file is written according to the verbosity level given by the user. Please have a look @mschmidt87

Branches of from #4, so should not be merged before.

Copy link
Contributor

@mschmidt87 mschmidt87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work. Just one minor comment.

n_total_individuals = population_size * (1 + int(mirrored_sampling))
logger.info('starting evolution with {} individuals per generation on {} threads'.format(n_total_individuals, parallel_threads))
if (parallel_threads is None and n_total_individuals > 1) or (parallel_threads is not None and n_total_individuals > parallel_threads):
logger.warning('more individuals than parallel threads. expect long runtime')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"expect long runtime" sounds a bit casual. What about

"more individuals ({}) than parallel threads ({}). consider increasing the number of parallel threads.".format(n_total_individuals, parallel_threads)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a convention to use only lowercase in logging messages?

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

Successfully merging this pull request may close these issues.

2 participants