MCPcopy Create free account
hub / github.com/InternScience/SciReason / filter

Method filter

opencompass/utils/logging.py:68–83  ·  view source on GitHub ↗

Filter the repeated error message. Args: record (LogRecord): The log record. Returns: bool: Whether to output the log record.

(self, record: logging.LogRecord)

Source from the content-addressed store, hash-verified

66 self.filter_duplicate_level.append(_nameToLevel[_level])
67
68 def filter(self, record: logging.LogRecord) -> bool:
69 """Filter the repeated error message.
70
71 Args:
72 record (LogRecord): The log record.
73
74 Returns:
75 bool: Whether to output the log record.
76 """
77 if record.levelno not in self.filter_duplicate_level:
78 return True
79
80 if record.msg not in self.seen:
81 self.seen.add(record.msg)
82 return True
83 return False
84
85
86def pretty_print_config(cfg):

Callers 10

mainFunction · 0.80
loadMethod · 0.80
loadMethod · 0.80
loadMethod · 0.80
loadMethod · 0.80
loadMethod · 0.80
loadMethod · 0.80
loadMethod · 0.80
loadMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected