From 4d2b88b1643cf1c2ff08fcf4bd948aaa251bcaa7 Mon Sep 17 00:00:00 2001 From: mrq Date: Sat, 3 Aug 2024 20:51:23 -0500 Subject: [PATCH] throw exception if training, but no model is set to train (because i ran into this wondering what the hell was happening) --- vall_e/utils/trainer.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/vall_e/utils/trainer.py b/vall_e/utils/trainer.py index 19946c5..9c85a85 100755 --- a/vall_e/utils/trainer.py +++ b/vall_e/utils/trainer.py @@ -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()