Skip to content

Commit

Permalink
ENH: Log training time in core.train, fix #2
Browse files Browse the repository at this point in the history
  • Loading branch information
NickleDave committed Feb 23, 2023
1 parent 9576b68 commit ca73b36
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/vak/core/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import logging
import pathlib
import shutil
import time

import joblib

Expand Down Expand Up @@ -361,8 +362,16 @@ def train(
default_callback_kwargs=default_callback_kwargs,
device=device,
)
train_start_time = time.time()
logger.info(
f"Training start time: {train_start_time}"
)
trainer.fit(
model=model,
train_dataloaders=train_loader,
val_dataloaders=val_loader,
)
elapsed = time.time() - train_start_time
logger.info(
f"Elapsed training time: {elapsed}"
)

0 comments on commit ca73b36

Please sign in to comment.