We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94d9150 commit 8155fc6Copy full SHA for 8155fc6
paddlex/utils/config.py
@@ -18,6 +18,7 @@
18
import yaml
19
from . import logging
20
from .errors import raise_key_not_found_error
21
+from .file_interface import custom_open
22
23
__all__ = ["get_config"]
24
@@ -61,7 +62,7 @@ def create_attr_dict(yaml_config):
61
62
63
def parse_config(cfg_file):
64
"""Load a config file into AttrDict"""
- with open(cfg_file, "r") as fopen:
65
+ with custom_open(cfg_file, "r") as fopen:
66
yaml_config = AttrDict(yaml.load(fopen, Loader=yaml.SafeLoader))
67
create_attr_dict(yaml_config)
68
return yaml_config
0 commit comments