def setLogName(self, log_name, comment=None): # comment is a unique identifier of the run if comment is None: comment = gen_random_string() name = os.path.join("default" if log_name is None else log_name, comment) self.log_dir = 'logs/' + name self.name = name self.count = 0
def __init__(self, log_name=None): self.log_name = log_name self.trainers = [] self.comment = gen_random_string()