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:
parent
d0a5c7eca2
commit
4d2b88b164
|
@ -126,6 +126,16 @@ def train(
|
||||||
):
|
):
|
||||||
engines = load_engines()
|
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():
|
if is_local_leader():
|
||||||
cfg.dump()
|
cfg.dump()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user