diff --git a/recbole/utils/logger.py b/recbole/utils/logger.py index d5d5d52ca..a50e8ce77 100644 --- a/recbole/utils/logger.py +++ b/recbole/utils/logger.py @@ -71,8 +71,9 @@ def init_logger(config): LOGROOT = './log/' dir_name = os.path.dirname(LOGROOT) ensure_dir(dir_name) - - logfilename = '{}-{}.log'.format(config['model'], get_local_time()) + model_name = os.path.join(dir_name, config['model']) + ensure_dir(model_name) + logfilename = '{}/{}.log'.format(config['model'], get_local_time()) logfilepath = os.path.join(LOGROOT, logfilename)