MCPcopy Index your code
hub / github.com/tensorlayer/TensorLayer / _GetNextLogCountPerToken

Function _GetNextLogCountPerToken

tensorlayer/logging/tl_logging.py:141–153  ·  view source on GitHub ↗

Wrapper for _log_counter_per_token. Args: token: The token for which to look up the count. Returns: The number of times this function has been called with *token* as an argument (starting at 0)

(token)

Source from the content-addressed store, hash-verified

139
140
141def _GetNextLogCountPerToken(token):
142 """Wrapper for _log_counter_per_token.
143
144 Args:
145 token: The token for which to look up the count.
146
147 Returns:
148 The number of times this function has been called with
149 *token* as an argument (starting at 0)
150 """
151 global _log_counter_per_token # pylint: disable=global-variable-not-assigned
152 _log_counter_per_token[token] = 1 + _log_counter_per_token.get(token, -1)
153 return _log_counter_per_token[token]
154
155
156def log_every_n(level, msg, n, *args):

Callers 2

log_every_nFunction · 0.85
log_first_nFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…