MalConv-Pytorch icon indicating copy to clipboard operation
MalConv-Pytorch copied to clipboard

depreciated calling yaml.load

Open londumas opened this issue 5 years ago • 0 comments

Current yaml.load has a depreciated behavior:

train.py:21: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  conf = yaml.load(open(config_path,'r'))

https://github.com/Alexander-H-Liu/MalConv-Pytorch/blob/939cb59ff1338dbc2b71a186f03bbc677b05c408/train.py#L21

The fix is given there https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation, and the previous line should be replace by the following:

conf = yaml.load(open(config_path,'r'), Loader=yaml.FullLoader)

londumas avatar Feb 18 '20 08:02 londumas