MCPcopy Create free account
hub / github.com/OpenGVLab/UniFormerV2 / log_json_stats

Function log_json_stats

slowfast/utils/logging.py:87–99  ·  view source on GitHub ↗

Logs json stats. Args: stats (dict): a dictionary of statistical information to log.

(stats)

Source from the content-addressed store, hash-verified

85
86
87def log_json_stats(stats):
88 """
89 Logs json stats.
90 Args:
91 stats (dict): a dictionary of statistical information to log.
92 """
93 stats = {
94 k: decimal.Decimal("{:.5f}".format(v)) if isinstance(v, float) else v
95 for k, v in stats.items()
96 }
97 json_stats = simplejson.dumps(stats, sort_keys=True, use_decimal=True)
98 logger = get_logger(__name__)
99 logger.info("json_stats: {:s}".format(json_stats))

Callers

nothing calls this directly

Calls 1

get_loggerFunction · 0.85

Tested by

no test coverage detected