MCPcopy Create free account
hub / github.com/Physical-Intelligence/openpi / CustomFormatter

Class CustomFormatter

scripts/train_pytorch.py:53–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51 level_mapping = {"DEBUG": "D", "INFO": "I", "WARNING": "W", "ERROR": "E", "CRITICAL": "C"}
52
53 class CustomFormatter(logging.Formatter):
54 def format(self, record):
55 record.levelname = level_mapping.get(record.levelname, record.levelname)
56 return super().format(record)
57
58 formatter = CustomFormatter(
59 fmt="%(asctime)s.%(msecs)03d [%(levelname)s] %(message)-80s (%(process)d:%(filename)s:%(lineno)s)",

Callers 1

init_loggingFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected