From 5c8694db8e076c0f543de7f69993a165cd484f1a Mon Sep 17 00:00:00 2001 From: mrq Date: Wed, 30 Aug 2023 18:23:05 -0500 Subject: [PATCH] nasty bandaid if there's no validation dataset specified during training (for example, during finetunes) --- scripts/run.sh | 2 +- vall_e/data.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/run.sh b/scripts/run.sh index 6cc6331..8c709d4 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash -until $@; do echo retrying && pkill python3; done +until $@; do echo retrying; done diff --git a/vall_e/data.py b/vall_e/data.py index 3ed852d..1153427 100755 --- a/vall_e/data.py +++ b/vall_e/data.py @@ -163,6 +163,11 @@ class Dataset(_Dataset): self.training = training self.dataset_type = "training" if self.training else "validation" self.dataset = cfg.dataset.training if self.training else cfg.dataset.validation + + # to-do: do not do validation if there's nothing in the validation + # this just makes it be happy + if len(self.dataset) == 0: + self.dataset = cfg.dataset.training self.paths_by_spkr_name = _load_paths(self.dataset, self.dataset_type) self.paths = list(itertools.chain.from_iterable(self.paths_by_spkr_name.values()))