mirror of
https://github.com/karpathy/nanochat.git
synced 2025-12-06 04:12:13 +00:00
few more reverts
This commit is contained in:
parent
cbd560a83d
commit
3fa974f93c
|
|
@ -20,7 +20,6 @@ class ColoredFormatter(logging.Formatter):
|
|||
}
|
||||
RESET = '\033[0m'
|
||||
BOLD = '\033[1m'
|
||||
|
||||
def format(self, record):
|
||||
# Add color to the level name
|
||||
levelname = record.levelname
|
||||
|
|
@ -35,7 +34,6 @@ class ColoredFormatter(logging.Formatter):
|
|||
message = re.sub(r'(Shard \d+)', rf'{self.COLORS["INFO"]}{self.BOLD}\1{self.RESET}', message)
|
||||
return message
|
||||
|
||||
|
||||
def setup_default_logging():
|
||||
handler = logging.StreamHandler()
|
||||
handler.setFormatter(ColoredFormatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s'))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user