Commit 7b90aa4d authored by Jan Kiene's avatar Jan Kiene
Browse files

make unique paths for cat/lab combi, not only for category

-> should solve data race bug when running tests in parallel
parent 53b1126e
Loading
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -42,15 +42,16 @@ def create_experiment_setup(experiment, lab) -> list[Path]:

    cfgs = list()
    for cat in categories:
        input_path = base_path.joinpath("proc_input").joinpath(cat)
        output_path = base_path.joinpath("proc_output").joinpath(cat)
        bg_noise_path = base_path.joinpath("background_noise").joinpath(f"background_noise_{cat}.wav")
        suffix = cat + f"-lab_{lab}"
        input_path = base_path.joinpath("proc_input").joinpath(suffix)
        output_path = base_path.joinpath("proc_output").joinpath(suffix)
        bg_noise_path = base_path.joinpath("background_noise").joinpath(f"background_noise_{suffix}.wav")
        cfg_path = default_cfg_path.parent.joinpath(f"{experiment}{cat}-lab_{lab}.yml")
        cfgs.append(cfg_path)

        # set new lab- and category-dependent values
        cfg = config.TestConfig(default_cfg_path)
        cfg.name = f"{experiment}{cat}-lab_{lab}"
        cfg.name = f"{experiment}{suffix}"
        cfg.prerun_seed = seed
        cfg.input_path = str(input_path)
        cfg.output_path = str(output_path)