22
33Authors
44 * Mirco Ravanelli 2022
5+ * Andreas Nautsch 2022
56"""
67import os
78import re
@@ -318,7 +319,7 @@ def run_recipe_tests(
318319 test_field = "test_debug_flags" ,
319320 check_field = "test_debug_checks" ,
320321 run_opts = "--device=cpu" ,
321- output_folder = "tests/recipe_tests /" ,
322+ output_folder = "tests/tmp/recipes /" ,
322323 filters_fields = [],
323324 filters = [],
324325 do_checks = True ,
@@ -429,9 +430,19 @@ def load_yaml_test(
429430 avoid_list = [
430431 "templates/hyperparameter_optimization_speaker_id/train.yaml" ,
431432 "templates/speaker_id/train.yaml" ,
433+ # recipes creating errors if NVIDIA driver is not on one's system
434+ "recipes/timers-and-such/multistage/hparams/train_LS_LM.yaml" ,
435+ "recipes/timers-and-such/multistage/hparams/train_TAS_LM.yaml" ,
436+ "recipes/timers-and-such/direct/hparams/train.yaml" ,
437+ "recipes/timers-and-such/decoupled/hparams/train_LS_LM.yaml" ,
438+ "recipes/timers-and-such/decoupled/hparams/train_TAS_LM.yaml" ,
439+ "recipes/fluent-speech-commands/direct/hparams/train.yaml" ,
440+ "recipes/CommonLanguage/lang_id/hparams/train_ecapa_tdnn.yaml" ,
441+ "recipes/SLURP/direct/hparams/train.yaml" ,
432442 ],
433- data_folder = "yaml_check_folder" ,
434- output_folder = "yaml_check_folder" ,
443+ rir_folder = "tests/tmp/rir" ,
444+ data_folder = "tests/tmp/yaml" ,
445+ output_folder = "tests/tmp/yaml" ,
435446):
436447 """Tests if the yaml files can be loaded without errors.
437448
@@ -453,6 +464,8 @@ def load_yaml_test(
453464 See above.
454465 avoid_list: list
455466 List of hparam file not to check.
467+ rir_folder:
468+ This overrides the rir_folder; rir_path, and openrir_folder usually specified in the hparam files.
456469 data_folder:
457470 This overrides the data_folder usually specified in the hparam files.
458471 output_folder:
@@ -470,19 +483,25 @@ def load_yaml_test(
470483 # Set data_foler and output folder
471484 data_folder = os .path .join (cwd , data_folder )
472485 output_folder = os .path .join (cwd , output_folder )
486+ rir_folder = os .path .join (cwd , rir_folder )
473487
474488 # Additional overrides
475489 add_overrides = {
476490 "manual_annot_folder" : data_folder ,
477491 "musan_folder" : data_folder ,
478492 "tea_models_dir" : data_folder ,
479- "rir_path" : data_folder ,
480493 "wsj_root" : data_folder ,
481494 "tokenizer_file" : data_folder ,
482495 "commonlanguage_folder" : data_folder ,
483496 "tea_infer_dir" : data_folder ,
484497 "original_data_folder" : data_folder ,
485498 "pretrain_st_dir" : data_folder ,
499+ # RIR folder specifications -> all point to the same zip file: one download destination
500+ "rir_path" : rir_folder ,
501+ "rir_folder" : rir_folder ,
502+ "openrir_folder" : rir_folder ,
503+ "open_rir_folder" : rir_folder ,
504+ "data_folder_rirs" : rir_folder ,
486505 }
487506
488507 # Read the csv recipe file and detect which tests we have to run
@@ -523,10 +542,10 @@ def load_yaml_test(
523542 # Append additional overrides when needed
524543 with open (hparam_file ) as f :
525544 for line in f :
526- for key in add_overrides .keys ():
545+ for key , value in add_overrides .items ():
527546 pattern = key + ":"
528547 if pattern in line and line .find (pattern ) == 0 :
529- overrides .update ({key : data_folder })
548+ overrides .update ({key : value })
530549
531550 with open (hparam_file ) as fin :
532551 try :
0 commit comments