1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-13 07:46:53 +08:00

safe yaml loader

This commit is contained in:
Young
2021-02-16 15:07:14 +00:00
committed by you-n-g
parent 0b11dc5167
commit 77830a546e
2 changed files with 2 additions and 2 deletions

View File

@@ -147,7 +147,7 @@ def init_from_yaml_conf(conf_path, **kwargs):
"""
with open(conf_path) as f:
config = yaml.load(f, Loader=yaml.FullLoader)
config = yaml.load(f, Loader=yaml.SafeLoader)
config.update(kwargs)
default_conf = config.pop("default_conf", "client")
init(default_conf, **config)