diff --git a/utils/yaml_config_hook.py b/utils/yaml_config_hook.py index edb2e91..c912352 100644 --- a/utils/yaml_config_hook.py +++ b/utils/yaml_config_hook.py @@ -9,12 +9,12 @@ def yaml_config_hook(config_file): """ # load yaml files in the nested 'defaults' section, which include defaults for experiments - with open(config_file) as f: + with open(config_file,encoding='utf-8') as f: cfg = yaml.safe_load(f) for d in cfg.get("defaults", []): config_dir, cf = d.popitem() cf = os.path.join(os.path.dirname(config_file), config_dir, cf + ".yaml") - with open(cf) as f: + with open(cf,encoding='utf-8') as f: l = yaml.safe_load(f) cfg.update(l)