diff --git a/PW_FT_classification/main.py b/PW_FT_classification/main.py index ec66333a1..a34ebb583 100644 --- a/PW_FT_classification/main.py +++ b/PW_FT_classification/main.py @@ -66,7 +66,7 @@ def main( os.environ["NUMEXPR_NUM_THREADS"] = str(np_threads) # Load and set configurations from the YAML file with open(config) as f: - conf = Munch(yaml.load(f, Loader=yaml.FullLoader)) + conf = Munch(yaml.safe_load(f)) conf.evaluate = evaluate conf.val = val conf.test = test diff --git a/PW_FT_detection/main.py b/PW_FT_detection/main.py index d3f7cd140..e7a522f58 100644 --- a/PW_FT_detection/main.py +++ b/PW_FT_detection/main.py @@ -8,7 +8,7 @@ def main(config:str='./config.yaml'): # Load and set configurations from the YAML file with open(config) as f: - cfg = Munch(yaml.load(f, Loader=yaml.FullLoader)) + cfg = Munch(yaml.safe_load(f)) if cfg.resume: model_path = cfg.weights