Skip to content

Commit

Permalink
log: use lazy logging
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasNeugebauer committed Nov 22, 2024
1 parent b3f5b04 commit ecacec7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trainer/app_code/yolov5_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def _on_metrics_published(self, training_state_data: TrainingStateData) -> None:
async def _get_latest_model_files(self) -> Dict[str, List[str]]:
weightfile = (self.training.training_folder_path / "result/weights/published/latest.pt").absolute()
if not os.path.isfile(weightfile):
logging.error(f'No model found at {weightfile} - Training failed!')
logging.error('No model found at %s - Training failed!', weightfile)
raise CriticalError(f'No model found at {weightfile}')

shutil.copy(weightfile, '/tmp/model.pt')
Expand Down

0 comments on commit ecacec7

Please sign in to comment.