From bb6aed536608396f786106758dc9ef6cb04bce70 Mon Sep 17 00:00:00 2001 From: lukewys Date: Thu, 18 Nov 2021 15:03:43 -0500 Subject: [PATCH] Fix the silly bug of f'{None}' prints 'None'. Huge thanks, Ethan! --- ddsp/training/data.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ddsp/training/data.py b/ddsp/training/data.py index 699fcf6d..dec02820 100644 --- a/ddsp/training/data.py +++ b/ddsp/training/data.py @@ -426,7 +426,7 @@ def __init__(self, split: Choices include ['train', 'test']. suffix: Choices include [None, 'batched', 'unbatched'], but broadly applies to any suffix adding to the file pattern. - When suffix is not None, will add "_suffix" to the file pattern. + When suffix is not None, will add "_{suffix}" to the file pattern. This option is used in gs://magentadata/datasets/urmp/urmp_20210324. With the "batched" suffix, the dataloader will load tfrecords containing segmented audio samples in 4 seconds. With the "unbatched" @@ -437,7 +437,7 @@ def __init__(self, self.instrument_key = instrument_key self.split = split self.base_dir = base_dir - self.suffix = suffix if suffix is None else '_' + suffix + self.suffix = '' if suffix is None else '_' + suffix super().__init__() @property