From 6a5f362ccced3f2c6704c22712de0d6ceb9a5a4d Mon Sep 17 00:00:00 2001 From: schneefux Date: Tue, 3 Apr 2018 12:37:46 +0200 Subject: improve logging --- processors/redis_to_word2vec.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'processors') diff --git a/processors/redis_to_word2vec.py b/processors/redis_to_word2vec.py index 752ee37..fd5f521 100644 --- a/processors/redis_to_word2vec.py +++ b/processors/redis_to_word2vec.py @@ -97,12 +97,12 @@ class RedisIterator(object): def discord_batch_handler(message): global model_updating - print("building vocabulary") + logging.info("building vocabulary") model.build_vocab(RedisIterator(match="message:*", deleting=False), update=model_updating) - print("vocabulary size: {}".format(len(model.wv.vocab))) - print("training") + logging.info("vocabulary size: {}".format(len(model.wv.vocab))) + logging.info("training") model.train(RedisIterator(match="message:*", deleting=True), total_examples=model.corpus_count, epochs=model.epochs) - print("trained") + logging.info("trained") model.save(config.model) model_updating = True if config.debug: -- cgit v1.3.1