throw exception if training, but no model is set to train (because i ran into this wondering what the hell was happening)

This commit is contained in:
mrq 2024-08-03 20:51:23 -05:00
parent d0a5c7eca2
commit 4d2b88b164

View File

@ -126,6 +126,16 @@ def train(
):
engines = load_engines()
# validate if there's at least one model to train
if training:
found = False
for name, engine in engines.items():
if engine.training:
found = True
break
if not found:
raise Exception('Training, but no model loaded set to train...')
"""
if is_local_leader():
cfg.dump()