MCPcopy Create free account
hub / github.com/YeWR/EfficientZero / init_logger

Function init_logger

core/utils.py:268–280  ·  view source on GitHub ↗
(base_path)

Source from the content-addressed store, hash-verified

266
267
268def init_logger(base_path):
269 # initialize the logger
270 formatter = logging.Formatter('[%(asctime)s][%(name)s][%(levelname)s][%(filename)s>%(funcName)s] ==> %(message)s')
271 for mode in ['train', 'test', 'train_test', 'root']:
272 file_path = os.path.join(base_path, mode + '.log')
273 logger = logging.getLogger(mode)
274 handler = logging.StreamHandler()
275 handler.setFormatter(formatter)
276 logger.addHandler(handler)
277 handler = logging.FileHandler(file_path, mode='a')
278 handler.setFormatter(formatter)
279 logger.addHandler(handler)
280 logger.setLevel(logging.DEBUG)
281
282
283def select_action(visit_counts, temperature=1, deterministic=True):

Callers 1

main.pyFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected