nasty bandaid if there's no validation dataset specified during training (for example, during finetunes)

This commit is contained in:
mrq 2023-08-30 18:23:05 -05:00
parent 7f4388e591
commit 5c8694db8e
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
until $@; do echo retrying && pkill python3; done until $@; do echo retrying; done

View File

@ -164,6 +164,11 @@ class Dataset(_Dataset):
self.dataset_type = "training" if self.training else "validation" self.dataset_type = "training" if self.training else "validation"
self.dataset = cfg.dataset.training if self.training else cfg.dataset.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_by_spkr_name = _load_paths(self.dataset, self.dataset_type)
self.paths = list(itertools.chain.from_iterable(self.paths_by_spkr_name.values())) self.paths = list(itertools.chain.from_iterable(self.paths_by_spkr_name.values()))