diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e8347caa7..57c99a5e5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -119,6 +119,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Fixed `num_workers` for Windows example ([#5375](https://github.com/PyTorchLightning/pytorch-lightning/pull/5375)) +- Fixed loading yaml ([#5619](https://github.com/PyTorchLightning/pytorch-lightning/pull/5619)) + ## [1.1.3rc] - 2020-12-29 ### Added diff --git a/pytorch_lightning/core/saving.py b/pytorch_lightning/core/saving.py index 33688eace7..2637d2c367 100644 --- a/pytorch_lightning/core/saving.py +++ b/pytorch_lightning/core/saving.py @@ -339,7 +339,7 @@ def load_hparams_from_yaml(config_yaml: str) -> Dict[str, Any]: return {} with fs.open(config_yaml, "r") as fp: - tags = yaml.full_load(fp) + tags = yaml.load(fp, Loader=yaml.UnsafeLoader) return tags diff --git a/requirements.txt b/requirements.txt index bdfd6601ba..339dbd0ec2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ numpy>=1.16.6 torch>=1.4 future>=0.17.1 # required for builtins in setup.py # pyyaml>=3.13 -PyYAML>=5.1, !=5.4.* # OmegaConf requirement >=5.1 +PyYAML>=5.1 # OmegaConf requirement >=5.1 tqdm>=4.41.0 fsspec[http]>=0.8.1 tensorboard>=2.2.0