lzhts1's picture
Upload 385 files
9897e20 verified
Raw
History Blame Contribute Delete
343 Bytes
from box import Box
import yaml
def load_config(cfg: str) -> Box:
"""Load configurations as a Box object.
Args:
cfg (str): Name of config file.
Returns:
Box: Box representation of configurations.
"""
with open(f"{cfg}.yaml", "r") as stream:
config = Box(yaml.safe_load(stream))
return config