MCPcopy Index your code
hub / github.com/FoundationVision/ByteTrack / get_caller_name

Function get_caller_name

yolox/utils/logger.py:12–25  ·  view source on GitHub ↗

Args: depth (int): Depth of caller conext, use 0 for caller depth. Default value: 0. Returns: str: module name of the caller

(depth=0)

Source from the content-addressed store, hash-verified

10
11
12def get_caller_name(depth=0):
13 """
14 Args:
15 depth (int): Depth of caller conext, use 0 for caller depth. Default value: 0.
16
17 Returns:
18 str: module name of the caller
19 """
20 # the following logic is a little bit faster than inspect.stack() logic
21 frame = inspect.currentframe().f_back
22 for _ in range(depth):
23 frame = frame.f_back
24
25 return frame.f_globals["__name__"]
26
27
28class StreamToLoguru:

Callers 1

writeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected