Update gpt2_genesis.py
@@ -100,8 +100,14 @@ class Miner():
# ---- Logging ----
self.tensorboard = SummaryWriter(log_dir = self.config.miner.full_path)
- if self.config.miner.record_log:
- logger.add(self.config.miner.full_path + "/{}_{}.log".format(self.config.miner.name, self.config.miner.trial_uid),format="{time:YYYY-MM-DD at HH:mm:ss} | {level} | {message}")
+ if self.config.miner.record_log == True:
+ filepath = self.config.miner.full_path + "/{}_{}.log".format(self.config.miner.name, self.config.miner.trial_uid),
+ logger.add (
+ filepath,
+ format="{time:YYYY-MM-DD at HH:mm:ss} | {level} | {message}",
+ rotation="250 MB",
+ retention="10 days"
+ )
@staticmethod
def default_config() -> Munch:
