MCPcopy Create free account
hub / github.com/togethercomputer/OpenChatKit / train_log

Function train_log

training/utils/logging_utils.py:46–55  ·  view source on GitHub ↗
(x, *args, **kargs)

Source from the content-addressed store, hash-verified

44 raise Exception('Unknown logging backend.')
45
46def train_log(x, *args, **kargs):
47
48 if train_log_backend == 'print':
49 print(x)
50 elif train_log_backend == 'loguru':
51 loguru.logger.info(x)
52 elif train_log_backend == 'wandb':
53 wandb.log(x, *args, **kargs)
54 else:
55 raise Exception('Unknown logging backend.')
56
57

Callers 2

test_loopFunction · 0.85
backward_stageMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_loopFunction · 0.68