Skip to content

Commit

Permalink
log: warn when base model uuid is set but invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasNeugebauer committed Nov 22, 2024
1 parent 1489d70 commit 3e913bc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion learning_loop_node/trainer/trainer_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,12 @@ async def _start_training(self):
if self._can_resume():
self.start_training_task = self._resume()
else:
if not self.training.base_model_uuid or not is_valid_uuid4(self.training.base_model_uuid):
base_model_uuid_is_none = self.training.base_model_uuid is None
base_model_uuid_is_valid = is_valid_uuid4(self.training.base_model_uuid)
if not base_model_uuid_is_none and not base_model_uuid_is_valid:
logging.warning('base_model_uuid is not a valid uuid4: %s\n Starting training from scratch.',
self.training.base_model_uuid)
if not base_model_uuid_is_valid:
self.start_training_task = self._start_training_from_scratch()
else:
self.start_training_task = self._start_training_from_base_model()
Expand Down

0 comments on commit 3e913bc

Please sign in to comment.