Skip to content

Commit

Permalink
Update loggers.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamDHines authored Jul 13, 2024
1 parent b1bc693 commit ff630bd
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions vprtempo/src/loggers.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ def model_logger():
Configure the model logger
"""
now = datetime.now()
output_folder = './vprtempo/output/' + now.strftime("%d%m%y-%H-%M-%S")
output_base_folder = './vprtempo/output/'
output_folder = output_base_folder + now.strftime("%d%m%y-%H-%M-%S")

# Create the base output folder if it does not exist
os.makedirs(output_base_folder, exist_ok=True)

# Create the specific output folder
os.mkdir(output_folder)
# Create the logger
logger = logging.getLogger("VPRTempo")
Expand Down Expand Up @@ -56,8 +61,13 @@ def model_logger_quant():
"""

now = datetime.now()
output_folder = './vprtempo/output/' + now.strftime("%d%m%y-%H-%M-%S")
output_base_folder = './vprtempo/output/'
output_folder = output_base_folder + now.strftime("%d%m%y-%H-%M-%S")

# Create the base output folder if it does not exist
os.makedirs(output_base_folder, exist_ok=True)

# Create the specific output folder
os.mkdir(output_folder)
# Create the logger
logger = logging.getLogger("VPRTempo")
Expand Down Expand Up @@ -91,4 +101,4 @@ def model_logger_quant():
logger.info('Current device is: CPU')
logger.info('')

return logger, output_folder
return logger, output_folder

0 comments on commit ff630bd

Please sign in to comment.