MCPcopy Index your code
hub / github.com/CandleLabAI/PCBSegClassNet / init_log

Function init_log

src/train_classification.py:26–39  ·  view source on GitHub ↗
(opt)

Source from the content-addressed store, hash-verified

24
25
26def init_log(opt):
27
28 logging.basicConfig(
29 level=logging.INFO,
30 format="%(asctime)s [%(levelname)s] %(message)s",
31 handlers=[
32 logging.FileHandler(opt["path"]["log_file"], mode="w"),
33 logging.StreamHandler(),
34 ],
35 )
36 logger = logging.getLogger(__name__)
37
38 logger.info(get_msg())
39 logger.info(dict2str(opt))
40
41
42def main():

Callers 1

mainFunction · 0.70

Calls 2

get_msgFunction · 0.90
dict2strFunction · 0.90

Tested by

no test coverage detected