From b4f20dd7d283ed64ab7429824839a533c8abf2e7 Mon Sep 17 00:00:00 2001 From: bobloy Date: Thu, 25 Mar 2021 09:54:14 -0400 Subject: [PATCH] Don't print everything, use log --- chatter/trainers.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/chatter/trainers.py b/chatter/trainers.py index d8de22c..962fa08 100644 --- a/chatter/trainers.py +++ b/chatter/trainers.py @@ -136,7 +136,7 @@ class MovieTrainer(KaggleTrainer): # log.exception(f"Bad line: {row}") # pass # else: - # # print(f"Good line: {row}") + # # log.info(f"Good line: {row}") # pass # # # lines_dict = {row[0].strip('"'): row[4] for row in reader_list} @@ -168,11 +168,10 @@ class MovieTrainer(KaggleTrainer): statements_from_file.append(statement) if statements_from_file: - print(statements_from_file) self.chatbot.storage.create_many(statements_from_file) statements_from_file = [] - print("Training took", time.time() - start_time, "seconds.") + log.info("Training took", time.time() - start_time, "seconds.") async def asynctrain(self, *args, **kwargs): extracted_lines = self.data_directory / "movie_lines.tsv" @@ -295,7 +294,7 @@ class UbuntuCorpusTrainer2(KaggleTrainer): if statements_from_file: self.chatbot.storage.create_many(statements_from_file) - print("Training took", time.time() - start_time, "seconds.") + log.info("Training took", time.time() - start_time, "seconds.") class TwitterCorpusTrainer(Trainer):