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

Function init_log

src/train_segmentation.py:43–58  ·  view source on GitHub ↗

Helper function for logging

(opt)

Source from the content-addressed store, hash-verified

41 return opt
42
43def init_log(opt):
44 """
45 Helper function for logging
46 """
47 logging.basicConfig(
48 level=logging.INFO,
49 format="%(asctime)s [%(levelname)s] %(message)s",
50 handlers=[
51 logging.FileHandler(opt["path"]["log_file"], mode="w"),
52 logging.StreamHandler(),
53 ],
54 )
55 logger = logging.getLogger(__name__)
56
57 logger.info(get_msg())
58 logger.info(dict2str(opt))
59
60def main():
61 """

Callers 1

mainFunction · 0.70

Calls 2

get_msgFunction · 0.90
dict2strFunction · 0.90

Tested by

no test coverage detected