ValueError: No valid path is found for training. #2

Closed
opened 2023-04-14 07:19:03 +07:00 by Bluebomber182 · 1 comments

I get this error message after using this command.
python -m vall_e.train yaml=/home/user/Downloads/vall-e/config/libri/config.yaml

╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /usr/lib/python3.10/runpy.py:196 in _run_module_as_main                      │
│                                                                              │
│   193 │   main_globals = sys.modules["__main__"].__dict__                    │
│   194 │   if alter_argv:                                                     │
│   195 │   │   sys.argv[0] = mod_spec.origin                                  │
│ ❱ 196 │   return _run_code(code, main_globals, None,                         │
│   197 │   │   │   │   │    "__main__", mod_spec)                             │
│   198                                                                        │
│   199 def run_module(mod_name, init_globals=None,                            │
│                                                                              │
│ /usr/lib/python3.10/runpy.py:86 in _run_code                                 │
│                                                                              │
│    83 │   │   │   │   │      __loader__ = loader,                            │
│    84 │   │   │   │   │      __package__ = pkg_name,                         │
│    85 │   │   │   │   │      __spec__ = mod_spec)                            │
│ ❱  86 │   exec(code, run_globals)                                            │
│    87 │   return run_globals                                                 │
│    88                                                                        │
│    89 def _run_module_code(code, init_globals=None,                          │
│                                                                              │
│ /home/user/Downloads/vall-e/vall_e/train.py:246 in <module>                   │
│                                                                              │
│   243                                                                        │
│   244                                                                        │
│   245 if __name__ == "__main__":                                             │
│ ❱ 246 │   main()                                                             │
│   247                                                                        │
│                                                                              │
│ /home/user/Downloads/vall-e/vall_e/train.py:74 in main                        │
│                                                                              │
│    71 def main():                                                            │
│    72 │   setup_logging(cfg.log_dir)                                         │
│    73 │                                                                      │
│ ❱  74 │   train_dl, subtrain_dl, val_dl = create_train_val_dataloader()      │
│    75 │                                                                      │
│    76 │   def train_feeder(engines, batch, name):                            │
│    77 │   │   stats = {}                                                     │
│                                                                              │
│ /home/user/Downloads/vall-e/vall_e/data.py:327 in create_train_val_dataloader │
│                                                                              │
│   324                                                                        │
│   325                                                                        │
│   326 def create_train_val_dataloader():                                     │
│ ❱ 327 │   train_dataset, val_dataset = create_datasets()                     │
│   328 │                                                                      │
│   329 │   subtrain_dataset = copy.deepcopy(train_dataset)                    │
│   330 │   subtrain_dataset.head_(cfg.max_num_val)                            │
│                                                                              │
│ /home/user/Downloads/vall-e/vall_e/data.py:308 in create_datasets             │
│                                                                              │
│   305 def create_datasets():                                                 │
│   306 │   train_paths, val_paths = _load_train_val_paths()                   │
│   307 │                                                                      │
│ ❱ 308 │   train_dataset = VALLEDatset(                                       │
│   309 │   │   train_paths,                                                   │
│   310 │   │   training=True,                                                 │
│   311 │   )                                                                  │
│                                                                              │
│ /home/user/Downloads/vall-e/vall_e/data.py:94 in __init__                     │
│                                                                              │
│    91 │   │   self.min_phones = min_phones                                   │
│    92 │   │   self.max_phones = max_phones                                   │
│    93 │   │                                                                  │
│ ❱  94 │   │   self.paths = [                                                 │
│    95 │   │   │   path for path in paths if _validate(path, self.min_phones, │
│    96 │   │   ]                                                              │
│    97                                                                        │
│                                                                              │
│ /home/user/Downloads/vall-e/vall_e/data.py:95 in <listcomp>                   │
│                                                                              │
│    92 │   │   self.max_phones = max_phones                                   │
│    93 │   │                                                                  │
│    94 │   │   self.paths = [                                                 │
│ ❱  95 │   │   │   path for path in paths if _validate(path, self.min_phones, │
│    96 │   │   ]                                                              │
│    97                                                                        │
│    98                                                                        │
│                                                                              │
│ /home/user/Downloads/vall-e/vall_e/data.py:64 in _validate                    │
│                                                                              │
│    61 def _validate(path, min_phones, max_phones):                           │
│    62 │   phones = _get_phones(path)                                         │
│    63 │   unique_phones = list(set(phones))                                  │
│ ❱  64 │   if not os.path.exists(_get_quant_path(path)):                      │
│    65 │   │   return False                                                   │
│    66 │                                                                      │
│    67 │   if len(unique_phones) == 0:                                        │
╰──────────────────────────────────────────────────────────────────────────────╯
NameError: name 'os' is not defined
I get this error message after using this command. `python -m vall_e.train yaml=/home/user/Downloads/vall-e/config/libri/config.yaml` ```203it [00:00, 137975.00it/s] ╭───────────────────── Traceback (most recent call last) ──────────────────────╮ │ /usr/lib/python3.10/runpy.py:196 in _run_module_as_main │ │ │ │ 193 │ main_globals = sys.modules["__main__"].__dict__ │ │ 194 │ if alter_argv: │ │ 195 │ │ sys.argv[0] = mod_spec.origin │ │ ❱ 196 │ return _run_code(code, main_globals, None, │ │ 197 │ │ │ │ │ "__main__", mod_spec) │ │ 198 │ │ 199 def run_module(mod_name, init_globals=None, │ │ │ │ /usr/lib/python3.10/runpy.py:86 in _run_code │ │ │ │ 83 │ │ │ │ │ __loader__ = loader, │ │ 84 │ │ │ │ │ __package__ = pkg_name, │ │ 85 │ │ │ │ │ __spec__ = mod_spec) │ │ ❱ 86 │ exec(code, run_globals) │ │ 87 │ return run_globals │ │ 88 │ │ 89 def _run_module_code(code, init_globals=None, │ │ │ │ /home/user/Downloads/vall-e/vall_e/train.py:246 in <module> │ │ │ │ 243 │ │ 244 │ │ 245 if __name__ == "__main__": │ │ ❱ 246 │ main() │ │ 247 │ │ │ │ /home/user/Downloads/vall-e/vall_e/train.py:74 in main │ │ │ │ 71 def main(): │ │ 72 │ setup_logging(cfg.log_dir) │ │ 73 │ │ │ ❱ 74 │ train_dl, subtrain_dl, val_dl = create_train_val_dataloader() │ │ 75 │ │ │ 76 │ def train_feeder(engines, batch, name): │ │ 77 │ │ stats = {} │ │ │ │ /home/user/Downloads/vall-e/vall_e/data.py:327 in create_train_val_dataloader │ │ │ │ 324 │ │ 325 │ │ 326 def create_train_val_dataloader(): │ │ ❱ 327 │ train_dataset, val_dataset = create_datasets() │ │ 328 │ │ │ 329 │ subtrain_dataset = copy.deepcopy(train_dataset) │ │ 330 │ subtrain_dataset.head_(cfg.max_num_val) │ │ │ │ /home/user/Downloads/vall-e/vall_e/data.py:308 in create_datasets │ │ │ │ 305 def create_datasets(): │ │ 306 │ train_paths, val_paths = _load_train_val_paths() │ │ 307 │ │ │ ❱ 308 │ train_dataset = VALLEDatset( │ │ 309 │ │ train_paths, │ │ 310 │ │ training=True, │ │ 311 │ ) │ │ │ │ /home/user/Downloads/vall-e/vall_e/data.py:94 in __init__ │ │ │ │ 91 │ │ self.min_phones = min_phones │ │ 92 │ │ self.max_phones = max_phones │ │ 93 │ │ │ │ ❱ 94 │ │ self.paths = [ │ │ 95 │ │ │ path for path in paths if _validate(path, self.min_phones, │ │ 96 │ │ ] │ │ 97 │ │ │ │ /home/user/Downloads/vall-e/vall_e/data.py:95 in <listcomp> │ │ │ │ 92 │ │ self.max_phones = max_phones │ │ 93 │ │ │ │ 94 │ │ self.paths = [ │ │ ❱ 95 │ │ │ path for path in paths if _validate(path, self.min_phones, │ │ 96 │ │ ] │ │ 97 │ │ 98 │ │ │ │ /home/user/Downloads/vall-e/vall_e/data.py:64 in _validate │ │ │ │ 61 def _validate(path, min_phones, max_phones): │ │ 62 │ phones = _get_phones(path) │ │ 63 │ unique_phones = list(set(phones)) │ │ ❱ 64 │ if not os.path.exists(_get_quant_path(path)): │ │ 65 │ │ return False │ │ 66 │ │ │ 67 │ if len(unique_phones) == 0: │ ╰──────────────────────────────────────────────────────────────────────────────╯ NameError: name 'os' is not defined ```
Bluebomber182 changed title from NameError: name 'os' is not defined to ValueError: No valid path is found for training. 2023-04-14 20:53:07 +07:00

I updated vall-e and now I no longer get the os error message. But now I get this error message. I made a custom folder inside the data folder. Here is a zip file of the custom folder.
https://files.catbox.moe/sgpca5.zip

python -m vall_e.train yaml=/home/user/Downloads/vall-e/config/libri/config.yaml
2023-04-14 13:18:00.475984: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-04-14 13:18:00.934317: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
203it [00:00, 173198.48it/s]
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /usr/lib/python3.10/runpy.py:196 in _run_module_as_main                                          │
│                                                                                                  │
│   193 │   main_globals = sys.modules["__main__"].__dict__                                        │
│   194 │   if alter_argv:                                                                         │
│   195 │   │   sys.argv[0] = mod_spec.origin                                                      │
│ ❱ 196 │   return _run_code(code, main_globals, None,                                             │
│   197 │   │   │   │   │    "__main__", mod_spec)                                                 │
│   198                                                                                            │
│   199 def run_module(mod_name, init_globals=None,                                                │
│                                                                                                  │
│ /usr/lib/python3.10/runpy.py:86 in _run_code                                                     │
│                                                                                                  │
│    83 │   │   │   │   │      __loader__ = loader,                                                │
│    84 │   │   │   │   │      __package__ = pkg_name,                                             │
│    85 │   │   │   │   │      __spec__ = mod_spec)                                                │
│ ❱  86 │   exec(code, run_globals)                                                                │
│    87 │   return run_globals                                                                     │
│    88                                                                                            │
│    89 def _run_module_code(code, init_globals=None,                                              │
│                                                                                                  │
│ /home/user/Downloads/vall-e/vall_e/train.py:251 in <module>                                       │
│                                                                                                  │
│   248                                                                                            │
│   249                                                                                            │
│   250 if __name__ == "__main__":                                                                 │
│ ❱ 251 │   main()                                                                                 │
│   252                                                                                            │
│                                                                                                  │
│ /home/user/Downloads/vall-e/vall_e/train.py:77 in main                                            │
│                                                                                                  │
│    74 def main():                                                                                │
│    75 │   setup_logging(cfg.log_dir)                                                             │
│    76 │                                                                                          │
│ ❱  77 │   train_dl, subtrain_dl, val_dl = create_train_val_dataloader()                          │
│    78 │                                                                                          │
│    79 │   def train_feeder(engines, batch, name):                                                │
│    80 │   │   stats = {}                                                                         │
│                                                                                                  │
│ /home/user/Downloads/vall-e/vall_e/data.py:334 in create_train_val_dataloader                     │
│                                                                                                  │
│   331                                                                                            │
│   332                                                                                            │
│   333 def create_train_val_dataloader():                                                         │
│ ❱ 334 │   train_dataset, val_dataset = create_datasets()                                         │
│   335 │                                                                                          │
│   336 │   subtrain_dataset = copy.deepcopy(train_dataset)                                        │
│   337 │   subtrain_dataset.head_(cfg.max_num_val)                                                │
│                                                                                                  │
│ /home/user/Downloads/vall-e/vall_e/data.py:315 in create_datasets                                 │
│                                                                                                  │
│   312 def create_datasets():                                                                     │
│   313 │   train_paths, val_paths = _load_train_val_paths()                                       │
│   314 │                                                                                          │
│ ❱ 315 │   train_dataset = VALLEDatset(                                                           │
│   316 │   │   train_paths,                                                                       │
│   317 │   │   training=True,                                                                     │
│   318 │   )                                                                                      │
│                                                                                                  │
│ /home/user/Downloads/vall-e/vall_e/data.py:120 in __init__                                        │
│                                                                                                  │
│   117 │   │   ]                                                                                  │
│   118 │   │                                                                                      │
│   119 │   │   if len(self.paths) == 0 and training:                                              │
│ ❱ 120 │   │   │   raise ValueError("No valid path is found for training.")                       │
│   121 │   │                                                                                      │
│   122 │   │   self.duration = 0                                                                  │
│   123 │   │   self.durations = {}                                                                │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ValueError: No valid path is found for training.

I updated vall-e and now I no longer get the os error message. But now I get this error message. I made a custom folder inside the data folder. Here is a zip file of the custom folder. https://files.catbox.moe/sgpca5.zip ``` python -m vall_e.train yaml=/home/user/Downloads/vall-e/config/libri/config.yaml 2023-04-14 13:18:00.475984: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. 2023-04-14 13:18:00.934317: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT 203it [00:00, 173198.48it/s] ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ /usr/lib/python3.10/runpy.py:196 in _run_module_as_main │ │ │ │ 193 │ main_globals = sys.modules["__main__"].__dict__ │ │ 194 │ if alter_argv: │ │ 195 │ │ sys.argv[0] = mod_spec.origin │ │ ❱ 196 │ return _run_code(code, main_globals, None, │ │ 197 │ │ │ │ │ "__main__", mod_spec) │ │ 198 │ │ 199 def run_module(mod_name, init_globals=None, │ │ │ │ /usr/lib/python3.10/runpy.py:86 in _run_code │ │ │ │ 83 │ │ │ │ │ __loader__ = loader, │ │ 84 │ │ │ │ │ __package__ = pkg_name, │ │ 85 │ │ │ │ │ __spec__ = mod_spec) │ │ ❱ 86 │ exec(code, run_globals) │ │ 87 │ return run_globals │ │ 88 │ │ 89 def _run_module_code(code, init_globals=None, │ │ │ │ /home/user/Downloads/vall-e/vall_e/train.py:251 in <module> │ │ │ │ 248 │ │ 249 │ │ 250 if __name__ == "__main__": │ │ ❱ 251 │ main() │ │ 252 │ │ │ │ /home/user/Downloads/vall-e/vall_e/train.py:77 in main │ │ │ │ 74 def main(): │ │ 75 │ setup_logging(cfg.log_dir) │ │ 76 │ │ │ ❱ 77 │ train_dl, subtrain_dl, val_dl = create_train_val_dataloader() │ │ 78 │ │ │ 79 │ def train_feeder(engines, batch, name): │ │ 80 │ │ stats = {} │ │ │ │ /home/user/Downloads/vall-e/vall_e/data.py:334 in create_train_val_dataloader │ │ │ │ 331 │ │ 332 │ │ 333 def create_train_val_dataloader(): │ │ ❱ 334 │ train_dataset, val_dataset = create_datasets() │ │ 335 │ │ │ 336 │ subtrain_dataset = copy.deepcopy(train_dataset) │ │ 337 │ subtrain_dataset.head_(cfg.max_num_val) │ │ │ │ /home/user/Downloads/vall-e/vall_e/data.py:315 in create_datasets │ │ │ │ 312 def create_datasets(): │ │ 313 │ train_paths, val_paths = _load_train_val_paths() │ │ 314 │ │ │ ❱ 315 │ train_dataset = VALLEDatset( │ │ 316 │ │ train_paths, │ │ 317 │ │ training=True, │ │ 318 │ ) │ │ │ │ /home/user/Downloads/vall-e/vall_e/data.py:120 in __init__ │ │ │ │ 117 │ │ ] │ │ 118 │ │ │ │ 119 │ │ if len(self.paths) == 0 and training: │ │ ❱ 120 │ │ │ raise ValueError("No valid path is found for training.") │ │ 121 │ │ │ │ 122 │ │ self.duration = 0 │ │ 123 │ │ self.durations = {} │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ValueError: No valid path is found for training. ```
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mrq/vall-e#2
There is no content yet.