log start time, end time, and elapsed

just in case...!
This commit is contained in:
Starbeamrainbowlabs 2023-01-16 17:30:20 +00:00
parent 1a4ac3ed66
commit 0b31c9e700
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
2 changed files with 12 additions and 0 deletions

View file

@ -19,6 +19,9 @@ import tensorflow as tf
from lib.dataset.dataset_mono import dataset_mono
from lib.ai.components.LossCrossEntropyDice import LossCrossEntropyDice
time_start = datetime.now()
logger.info(f"Starting at {str(datetime.now().isoformat())}")
IMAGE_SIZE = int(os.environ["IMAGE_SIZE"]) if "IMAGE_SIZE" in os.environ else 128 # was 512; 128 is the highest power of 2 that fits the data
BATCH_SIZE = int(os.environ["BATCH_SIZE"]) if "BATCH_SIZE" in os.environ else 64
NUM_CLASSES = 2
@ -317,3 +320,5 @@ plot_predictions(
colormap,
model=model
)
logger.info(f"Complete at {str(datetime.now().isoformat())}, elapsed {str((datetime.now() - time_start).total_seconds())} seconds")

View file

@ -2,6 +2,7 @@
import importlib
import sys
from datetime import datetime
from loguru import logger
@ -15,9 +16,15 @@ def main():
if args == None:
return
time_start = datetime.utcnow()
logger.info(f"Time: Starting subcommand {subcommand} at {str(datetime.utcnow().isoformat())}")
imported_module = importlib.import_module(f"subcommands.{subcommand}")
imported_module.run(args)
logger.info(f"*** complete in {str((datetime.now() - time_start).total_seconds())} seconds ***")
if __name__ == "__main__":
main()